| VERSION | = | '0.7.20' | Moneta version number @api public |
Create new Moneta store with default proxies
This works in most cases if you don‘t want fine control over the proxy stack. It uses Marshal on the keys and values. Use Moneta#build if you want to have fine control!
@param [Symbol] name Name of adapter (See Moneta::Adapters) @param [Hash] options @return [Moneta store] newly created Moneta store @option options [Boolean/Integer] :expires Ensure that store supports expiration by inserting
{Expires} if the underlying adapter doesn't support it natively
and set default expiration time
@option options [Boolean] :threadsafe (false) Ensure that the store is thread safe by inserting Moneta::Lock @option options [Boolean/Hash] :logger (false) Add logger to proxy stack (Hash is passed to logger as options) @option options [Boolean/Symbol] :compress (false) If true, compress value with zlib, or specify custom compress, e.g. :quicklz @option options [Symbol] :serializer (:marshal) Serializer used for key and value, disable with nil @option options [Symbol] :key_serializer (options[:serializer]) Serializer used for key, disable with nil @option options [Symbol] :value_serializer (options[:serializer]) Serializer used for value, disable with nil @option options [String] :prefix Key prefix used for namespacing (default none) @option options All other options passed to the adapter
Supported adapters:
@api public