coldbox.system.cache.store

Class BlackHoleStore

lucee.Component
    extended by coldbox.system.cache.store.BlackHoleStore
All Implemented Interfaces:
IObjectStore

Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com --- I am the fastest way to cache objects. I am so fast because I don't do anything. I'm really a tool to use when working on caching strategies. When I am in use nothing is cached. It just vanishes.

Class Attributes:
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  
  • author : Luis Majano
  •  
    Property Summary
    type property default serializable required
    any<ICacheProvider> cacheProvider
          The cache provider reference.

    • access = public
    • returntype = any
    • doc_generic = coldbox.system.cache.providers.ICacheProvider
    true false
    any storeID
          The human store name.

    • access = public
    • returntype = any
    true false
    Constructor Summary
    init(any<ICacheProvider> cacheProvider)
          Constructor.
    Method Summary
    any clear(any objectKey)
         Clears an object from the storage.
    void clearAll()
         Clear all the elements in the store.
    void expireObject(any objectKey)
         Expire an object.
    void flush()
         Flush the store to a permanent storage.
    any get(any objectKey)
         Get an object from the store with metadata tracking.
    string getCacheProvider()
    any getIndexer()
         Get the store's pool metadata indexer structure.
    any getKeys()
         Get all the store's object keys array.
    any getQuiet(any objectKey)
         Get an object from cache with no metadata tracking.
    any getSize()
         Get the size of the store.
    string getStoreID()
    any isExpired(any objectKey)
         Expire check.
    any lookup(any objectKey)
         Check if an object is in the store.
    void reap()
         Reap the storage.
    void set(any objectKey, any object, [any timeout='0'], [any lastAccessTimeout='0'], [any extras='[runtime expression]'])
         Sets an object in the storage.
    any setCacheProvider(any cacheProvider)
    any setStoreID(any storeID)
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init(any<ICacheProvider> cacheProvider)

    Constructor

    Parameters:
    cacheProvider - The associated cache provider as coldbox.system.cache.providers.ICacheProvider

    Property Detail

    cacheProvider

    property any<ICacheProvider> cacheProvider

    The cache provider reference

    Attributes:
    access - public
    required - false
    returntype - any
    doc_generic - coldbox.system.cache.providers.ICacheProvider
    serializable - true

    storeID

    property any storeID

    The human store name

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    Method Detail

    clear

    public any clear(any objectKey)

    Clears an object from the storage

    Specified by:
    clear in interface IObjectStore
    Parameters:
    objectKey - The object key to clear

    clearAll

    public void clearAll()

    Clear all the elements in the store

    Specified by:
    clearAll in interface IObjectStore

    expireObject

    public void expireObject(any objectKey)

    Expire an object

    Specified by:
    expireObject in interface IObjectStore
    Parameters:
    objectKey - The key to expire

    flush

    public void flush()

    Flush the store to a permanent storage

    Specified by:
    flush in interface IObjectStore

    get

    public any get(any objectKey)

    Get an object from the store with metadata tracking

    Specified by:
    get in interface IObjectStore
    Parameters:
    objectKey - The key to retrieve

    getCacheProvider

    public string getCacheProvider()


    getIndexer

    public any getIndexer()

    Get the store's pool metadata indexer structure

    Specified by:
    getIndexer in interface IObjectStore
    Returns:
    coldbox.system.cache.store.indexers.MetadataIndexer

    getKeys

    public any getKeys()

    Get all the store's object keys array

    Specified by:
    getKeys in interface IObjectStore
    Returns:
    array

    getQuiet

    public any getQuiet(any objectKey)

    Get an object from cache with no metadata tracking

    Specified by:
    getQuiet in interface IObjectStore
    Parameters:
    objectKey - The key to retrieve

    getSize

    public any getSize()

    Get the size of the store

    Specified by:
    getSize in interface IObjectStore

    getStoreID

    public string getStoreID()


    isExpired

    public any isExpired(any objectKey)

    Expire check

    Specified by:
    isExpired in interface IObjectStore
    Parameters:
    objectKey - The key to check
    Returns:
    boolean

    lookup

    public any lookup(any objectKey)

    Check if an object is in the store

    Specified by:
    lookup in interface IObjectStore
    Parameters:
    objectKey - The key to lookup
    Returns:
    boolean

    reap

    public void reap()

    Reap the storage

    Specified by:
    reap in interface IObjectStore

    set

    public void set(any objectKey, any object, [any timeout='0'], [any lastAccessTimeout='0'], [any extras='[runtime expression]'])

    Sets an object in the storage

    Specified by:
    set in interface IObjectStore
    Parameters:
    objectKey - The object key
    object - The object to save
    timeout - Timeout in minutes
    lastAccessTimeout - Idle Timeout in minutes
    extras - A map of extra name-value pairs to store alongside the object

    setCacheProvider

    public any setCacheProvider(any cacheProvider)

    Parameters:
    cacheProvider

    setStoreID

    public any setStoreID(any storeID)

    Parameters:
    storeID