タグ

2009年9月1日のブックマーク (2件)

  • Lazily sweeping the whole Rails page cache Fingertips

    One of the more convenient features in Ruby on Rails is page caching. Simply add caches_page :show to the top of a controller class, and all pages rendered by the show action are written to disk automatically. On subsequent request, these pages will be served straight from disk without invoking Rails at all. This works because of rewrite rules that basically tell the webserver to append .html to t

  • Ruby で Akismet

    前置き 自作のブログ管理システムであるRanaPrunusでは、スパムコメント対策として以下を行っている。 ワンタイムトークンによるチェックIPアドレスブラックリストチェックNGワードチェック だいたい90%くらいのスパムコメントがワンタイムトークンによるチェックではじくことができ、IPアドレスとNGワードのチェックで残りの5%くらいをはじくことができる。 そして残ったスパムコメントをAkismetで完全に遮断してみようかと思う。 Akismet.rb 色々調べてみると、すでにrubyによるAkismetライブラリはあるようで、bedeviled mojo slop - A blog by David Czarneckiなんかが紹介されているが、少々修正が必要なようだ。 akismet.rb RanaPrunusでは、実際にMephistoで使われているakismet.rbを利用する事にし