Permalink
Browse files

Add delete example to caching plugin documentation

  • Loading branch information...
1 parent 28dc423 commit 2d25ecf5bf03ec7d18b57e40a92af947a97453b4 @jeremyevans committed Mar 19, 2010
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/sequel/plugins/caching.rb
@@ -15,11 +15,15 @@ module Plugins
# cache_store.get(key) => obj # Returns object set with same key.
# cache_store.get(key2) => nil # nil returned if there isn't an object
# # currently in the cache with that key.
+ # cache_store.delete(key) # Remove key from cache
#
# If the :ignore_exceptions option is true, exceptions raised by cache_store.get
# are ignored and nil is returned instead. The memcached API is to
# raise an exception for a missing record, so if you use memcached, you will
# want to use this option.
+ #
+ # Note that only Model.[] method calls with a primary key argument are cached
+ # using this plugin.
module Caching
# Set the cache_store and cache_ttl attributes for the given model.
# If the :ttl option is not given, 3600 seconds is the default.

0 comments on commit 2d25ecf

Please sign in to comment.