com.gilt.gfc.guava

cache

package cache

Visibility
  1. Public
  2. All

Type Members

  1. class CacheInitializationStrategy extends Enum[CacheInitializationStrategy]

  2. trait ManuallyReloadableCache[K, V] extends LoadingCache[K, V]

  3. trait ShutdownableLoadingCache[K, V] extends LoadingCache[K, V]

    Wrapper for Guava's LoadingCache/CacheBuilder API with a bulk cache load and replacement strategy.

    Wrapper for Guava's LoadingCache/CacheBuilder API with a bulk cache load and replacement strategy. To use this, at a minimum you pass in a reload period in ms, which dictates how often to reload the cache. Note that this is the amount of time between the end of one reload operation, and the next; this does not try to maintain a constant frequency. You must also pass in a reloader method, which is called to get an iterator of the key/value pairs to put in the cache. Finally you may pass in an optional CacheBuilder instance, which is used to actually create the cache, an onMiss function, which is called from the Guava CacheLoader.load method to decide what to do when there is a cache miss (default behavior is a RuntimeException); and an executor which is used to actually schedule cache reloads.

    Note that caching, and Guava's caching, are hard topics. For example it is rarely a good idea to have a read-back cache in Gilt's business model -- in general we never want to miss cache, which is what this implementation is tuned for. But you may have some luck tweaking specific behavior by passing in your own CacheBuilder. Please do read the Guava documentation carefully before embarking upon advanced use.

    Since

    5/21/12 7:02 AM

  4. class CacheSet extends AnyRef

    Keeps named references to a bunch of related Guava Caches.

    Keeps named references to a bunch of related Guava Caches.

    One use case is to declare a singleton and register all permanent caches with it to simplify monitoring/reporting.

    object AppCacheSet extends CacheSet
    Annotations
    @deprecated
    Deprecated

    (Since version 0.0.9) Trivial code, unused in Gilt, surplus to requirements

  5. class RichCache[K, V, C <: Cache[K, V]] extends Proxy

    Scala-friendly methods for Guava Cache

    Scala-friendly methods for Guava Cache

    Annotations
    @deprecated
    Deprecated

    (Since version 0.0.9) Use BulkLoadingCache

  6. class RichCacheBuilder[K0, V0] extends Proxy

    Scala-friendly methods for Guava CacheBuilder

    Scala-friendly methods for Guava CacheBuilder

    Annotations
    @deprecated
    Deprecated

    (Since version 0.0.9) Use BulkLoadingCache

  7. class RichLoadingCache[K, V] extends RichCache[K, V, LoadingCache[K, V]]

    Annotations
    @deprecated
    Deprecated

    (Since version 0.0.9) Use BulkLoadingCache

Value Members

  1. object BulkLoadingCache

  2. object BulkLoadingCacheFactory

    Java factory API for creating a BulkLoadingCache, which is a LoadingCache that periodically bulk-loads and atomically updates itself.

    Java factory API for creating a BulkLoadingCache, which is a LoadingCache that periodically bulk-loads and atomically updates itself.

    Since

    5/28/12 4:07 PM

Deprecated Value Members

  1. object CacheConversions

    Implicit conversions to/from Guava Cache & CacheBuilder

    Implicit conversions to/from Guava Cache & CacheBuilder

    Annotations
    @deprecated
    Deprecated

    (Since version 0.0.9) Use BulkLoadingCache

  2. object CacheUtils

    Utils for Guava Cache

    Utils for Guava Cache

    Annotations
    @deprecated
    Deprecated

    (Since version 0.0.9) Use BulkLoadingCache

Ungrouped