cachebox.system.cache.store

Class DiskStore

lucee.Component
    extended by cachebox.system.cache.store.DiskStore
All Implemented Interfaces:
IObjectStore

I am a disk store, I am not that fancy as I am slower.

Class Attributes:
  • output : false
  •  
  • synchronized : false
  •  
  • accessors : false
  •  
  • persistent : false
  •  
    Constructor Summary
    init(any<ICacheProvider> cacheProvider)
          Constructor.
    Method Summary
    any clear(any objectKey)
         Clears an object from the storage pool.
    void clearAll()
         Clear all elements of the store.
    void expireObject(any objectKey)
         Mark an object for expiration.
    void flush()
         Flush the store to a permanent storage.
    any get(any objectKey)
         Get an object from cache.
    private any getCacheFilePath(any objectKey)
         Get the cached file path.
    any getIndexer()
         Get the store's pool metadata indexer structure.
    any getKeys()
         Get all the store's object keys.
    any getQuiet(any objectKey)
         Get an object from cache with no stats.
    any getSize()
         Get the cache's size in items.
    any getStoreID()
         Get this storage's ID.
    private any getUtil()
         Create and return a util object.
    any isExpired(any objectKey)
         Test if an object in the store has expired or not.
    any lookup(any objectKey)
         Check if an object is in cache.
    void reap()
         Reap the storage, clean it from old stuff.
    void set(any objectKey, any object, [any timeout=''], [any lastAccessTimeout=''], [any extras='[runtime expression]'])
         sets an object in the storage.
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init(any<ICacheProvider> cacheProvider)

    Constructor

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

    Method Detail

    clear

    public any clear(any objectKey)

    Clears an object from the storage pool

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

    clearAll

    public void clearAll()

    Clear all elements of the store

    Specified by:
    clearAll in interface IObjectStore

    expireObject

    public void expireObject(any objectKey)

    Mark an object for expiration

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

    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 cache

    Specified by:
    get in interface IObjectStore
    Parameters:
    objectKey - The key of the object

    getCacheFilePath

    private any getCacheFilePath(any objectKey)

    Get the cached file path

    Parameters:
    objectKey - The key of the object

    getIndexer

    public any getIndexer()

    Get the store's pool metadata indexer structure

    Specified by:
    getIndexer in interface IObjectStore

    getKeys

    public any getKeys()

    Get all the store's object keys

    Specified by:
    getKeys in interface IObjectStore

    getQuiet

    public any getQuiet(any objectKey)

    Get an object from cache with no stats

    Specified by:
    getQuiet in interface IObjectStore
    Parameters:
    objectKey - The key of the object

    getSize

    public any getSize()

    Get the cache's size in items

    Specified by:
    getSize in interface IObjectStore

    getStoreID

    public any getStoreID()

    Get this storage's ID


    getUtil

    private any getUtil()

    Create and return a util object


    isExpired

    public any isExpired(any objectKey)

    Test if an object in the store has expired or not

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

    lookup

    public any lookup(any objectKey)

    Check if an object is in cache.

    Specified by:
    lookup in interface IObjectStore
    Parameters:
    objectKey - The key of the object

    reap

    public void reap()

    Reap the storage, clean it from old stuff

    Specified by:
    reap in interface IObjectStore

    set

    public void set(any objectKey, any object, [any timeout=''], [any lastAccessTimeout=''], [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 - Timeout in minutes
    extras - A map of extra name-value pairs