phpDocumentor Cotonti
[ class tree: Cotonti ] [ index: Cotonti ] [ all elements ]

Class: File_cache

Source Location: /cache.php

Class File_cache

Class Overview

A persistent cache using local file system tree. It does not use multilevel structure or lexicograph search, so it may slow down when your cache grows very big.

But normally it is very fast reads.

Located in /cache.php [line 273]

Static_cache_driver
   |
   --File_cache
Author(s):
  • trustmaster
Information Tags:

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From Static_cache_driver

Static_cache_driver::store()
Stores data as object image in cache

[ Top ]
Method Summary
File_cache   __construct()   Cache storage object constructor
void   clear()  
bool   exists()   Checks if an object is stored in disk cache
mixed   get()   Gets an object directly from disk
void   remove()   Removes cache image of the object from disk
bool   store()   Stores disk cache entry

[ Top ]
Methods
Constructor __construct  [line 286]

  File_cache __construct( [string $dir = '']  )

Cache storage object constructor

Parameters:
string   $dir:  Cache root directory. System default will be used if empty.

API Tags:
Access:  public


[ Top ]
clear  [line 304]

  void clear( [ $realm = COT_DEFAULT_REALM]  )

Parameters:
   $realm: 

API Tags:
See:  Cache_driver::clear()
Access:  public


[ Top ]
exists  [line 341]

  bool exists( string $id, [string $realm = COT_DEFAULT_REALM]  )

Checks if an object is stored in disk cache

Parameters:
string   $id:  Object identifier
string   $realm:  Cache realm

API Tags:
Access:  public


[ Top ]
get  [line 352]

  mixed get( string $id, [string $realm = COT_DEFAULT_REALM]  )

Gets an object directly from disk

Parameters:
string   $id:  Object identifier
string   $realm:  Realm name

API Tags:
Return:  Cached item value or NULL if the item was not found in cache
Access:  public


[ Top ]
remove  [line 369]

  void remove( string $id, [string $realm = COT_DEFAULT_REALM]  )

Removes cache image of the object from disk

Parameters:
string   $id:  Object identifier
string   $realm:  Realm name

API Tags:
Access:  public


[ Top ]
store  [line 386]

  bool store( string $id, mixed $data, [string $realm = COT_DEFAULT_REALM]  )

Stores disk cache entry

Parameters:
string   $id:  Object identifier
mixed   $data:  Object value
string   $realm:  Realm name

API Tags:
Access:  public


Redefinition of:
Static_cache_driver::store()
Stores data as object image in cache

[ Top ]

Documentation generated on Fri, 19 Mar 2010 17:45:21 +0000 by phpDocumentor 1.4.3