Module: Mobility::Plugins::Cache

Extended by:
Mobility::Plugin
Defined in:
lib/mobility/plugins/cache.rb

Overview

Caches values fetched from the backend so subsequent fetches can be performed more quickly. The cache stores cached values in a simple hash, which is not optimal for some storage strategies, so some backends (KeyValue, Table) use a custom module by defining a method, include_cache, on the backend class.

The cache is reset when one of a set of events happens (saving, reloading, etc.). See BackendResetter for details.

Values are added to the cache in two ways:

  1. first read from backend

  2. any write to backend

Defined Under Namespace

Modules: BackendMethods

Method Summary

Methods included from Mobility::Plugin

configure, configure_default, default, dependencies, dependencies_satisfied?, included, included_hook, initialize_hook, requires