method
write
![Some documentation Importance_1](https://d2vfyqvduarcvs.cloudfront.net/images/importance_1.png?1349367920)
write(key, value, options = nil)
public
Writes the given value to the cache, with the given key.
You may also specify additional options via the options argument. The specific cache store implementation will decide what to do with options.
For example, MemCacheStore supports the :expires_in option, which tells the memcached server to automatically expire the cache item after a certain period:
cache = ActiveSupport::Cache::MemCacheStore.new cache.write("foo", "bar", :expires_in => 5.seconds) cache.read("foo") # => "bar" sleep(6) cache.read("foo") # => nil