Type:
Class
Constants:
PER_ENTRY_OVERHEAD : 240

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 Rails server process instances won't be able to share cache data with each other and this may not be the most appropriate cache in that scenario.

This cache has a bounded size specified by the :size options to the initializer (default is 32Mb). When the cache exceeds the allotted size, a cleanup will occur which tries to prune the cache down to three quarters of the maximum size by removing the least recently used entries.

MemoryStore is thread-safe.

decrement

decrement(name, amount = 1, options = nil) Instance Public methods Decrement

2015-06-20 00:00:00
clear

clear(options = nil) Instance Public methods

2015-06-20 00:00:00
cached_size

cached_size(key, entry) Instance Protected methods

2015-06-20 00:00:00
cleanup

cleanup(options = nil) Instance Public methods Preemptively iterates through

2015-06-20 00:00:00
increment

increment(name, amount = 1, options = nil) Instance Public methods Increment

2015-06-20 00:00:00
pruning?

pruning?() Instance Public methods Returns true if the cache is currently being

2015-06-20 00:00:00
new

new(options = nil) Class Public methods

2015-06-20 00:00:00
delete_matched

delete_matched(matcher, options = nil) Instance Public methods

2015-06-20 00:00:00
prune

prune(target_size, max_time = nil) Instance Public methods To ensure entries

2015-06-20 00:00:00