My Project
 All Data Structures Namespaces Functions Variables
Public Member Functions | Protected Attributes
CI_Cache_file Class Reference
Inheritance diagram for CI_Cache_file:
CI_Driver

Public Member Functions

 __construct ()
 
 get ($id)
 
 save ($id, $data, $ttl=60)
 
 delete ($id)
 
 clean ()
 
 cache_info ($type=NULL)
 
 get_metadata ($id)
 
 is_supported ()
 
- Public Member Functions inherited from CI_Driver
 decorate ($parent)
 
 __call ($method, $args=array())
 
 __get ($var)
 
 __set ($var, $val)
 

Protected Attributes

 $_cache_path
 
- Protected Attributes inherited from CI_Driver
 $parent
 

Constructor & Destructor Documentation

__construct ( )

Constructor

Member Function Documentation

cache_info (   $type = NULL)

Cache Info

Not supported by file-based caching

Parameters
stringuser/filehits
Returns
mixed FALSE
clean ( )

Clean the Cache

Returns
boolean false on failure/true on success
delete (   $id)

Delete from Cache

Parameters
mixedunique identifier of item in cache
Returns
boolean true on success/false on failure
get (   $id)

Fetch from cache

Parameters
mixedunique key id
Returns
mixed data on success/false on failure
get_metadata (   $id)

Get Cache Metadata

Parameters
mixedkey to get cache metadata on
Returns
mixed FALSE on failure, array on success.
is_supported ( )

Is supported

In the file driver, check to see that the cache directory is indeed writable

Returns
boolean
save (   $id,
  $data,
  $ttl = 60 
)

Save into cache

Parameters
stringunique key
mixeddata to store
intlength of time (in seconds) the cache is valid
  • Default is 60 seconds
Returns
boolean true on success/false on failure

The documentation for this class was generated from the following file: