Class

ActiveSupport::Cache::MemoryStore

Inheritance
< ActiveSupport::Cache::Store < Object

A cache store implementation which stores everything into memory in the same process. If you‘re running multiple Ruby on Rails server processes (which is the case if you‘re using mongrel_cluster or Phusion Passenger), then this means that your Rails server process instances won‘t be able to share cache data with each other. If your application never performs manual cache item expiry (e.g. when you‘re using generational cache keys), then using MemoryStore is ok. Otherwise, consider carefully whether you should be using this cache store.

MemoryStore is not only able to store strings, but also arbitrary Ruby objects.

MemoryStore is not thread-safe. Use SynchronizedMemoryStore instead if you need thread-safety.

Methods

Class

Visibility Signature
public new ()

Instance

Visibility Signature
public clear ()
public delete (name, options = nil)
public delete_matched (matcher, options = nil)
public exist? (name,options = nil)
public read (name, options = nil)
public write (name, value, options = nil)

Class Method Detail

new()

Instance Method Detail

clear()

delete(name, options = nil)

delete_matched(matcher, options = nil)

exist?(name,options = nil)

read(name, options = nil)

write(name, value, options = nil)