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

Procedural File: cache.php

Source Location: /cache.php

Page Details

Cache subsystem library

Author:  Trustmaster
Version:  0.7.0
Copyright:  Copyright (c) Cotonti Team 2009-2010
License:  BSD
Classes
Class Description
Cache_driver Abstract class containing code common for all cache drivers
Static_cache_driver Static cache is used to store large amounts of rarely modified data
Dynamic_cache_driver Dynamic cache is used to store data that is not too large
Writeback_cache_driver Persistent cache driver that writes all entries back on script termination.
Db_cache_driver Query cache drivers are driven by database
Temporary_cache_driver Temporary cache driver is fast in-memory cache. It usually works faster and provides automatic garbage collection, but it doesn't save data if PHP stops whatsoever.
File_cache 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.
Page_cache A cache that stores entire page outputs. Disk-based.
MySQL_cache A very popular caching solution using MySQL as a storage. It is quite slow compared to File_cache but may be considered more reliable.
Memcache_driver Memcache distributed persistent cache driver implementation. Give it a higher priority if a cluster of webservers is used and Memcached is running via TCP/IP between them.
APC_driver Accelerated PHP Cache driver implementation. This should be used as default cacher on APC-enabled hosts.
eAccelerator_driver eAccelerator driver implementation. This should be used as default cacher on hosts providing eAccelerator.
Xcache_driver XCache variable cache driver. It should be used on hosts that use XCache for PHP acceleration and variable cache.
Cache Multi-layer universal cache controller for Cotonti
Constants
COT_CACHE_TYPE_ALL  [line 28]

COT_CACHE_TYPE_ALL = 0

Default cache type, uneffective


[ Top ]

COT_CACHE_TYPE_DB  [line 36]

COT_CACHE_TYPE_DB = 2

Database cache type


[ Top ]

COT_CACHE_TYPE_DISK  [line 32]

COT_CACHE_TYPE_DISK = 1

Disk cache type


[ Top ]

COT_CACHE_TYPE_MEMORY  [line 40]

COT_CACHE_TYPE_MEMORY = 3

Shared memory cache type


[ Top ]

COT_CACHE_TYPE_PAGE  [line 44]

COT_CACHE_TYPE_PAGE = 4

Page cache type


[ Top ]

COT_DEFAULT_REALM  [line 20]

COT_DEFAULT_REALM = 'cot'

Default cache realm


[ Top ]

COT_DEFAULT_TTL  [line 24]

COT_DEFAULT_TTL = 3600

Default time to live for temporary cache objects


[ Top ]


Functions
sed_cache_clear  [line 1460]

bool sed_cache_clear( string $name  )

Clears cache item

Parameters:
string   $name:  Item name

API Tags:
Deprecated:  Deprecated since 0.7.0, use $cot_cache->db object instead


[ Top ]
sed_cache_clearall  [line 1473]

bool sed_cache_clearall( )

Clears cache completely


API Tags:
Deprecated:  Deprecated since 0.7.0, use $cot_cache->db object instead


[ Top ]
sed_cache_clearhtml  [line 1487]

bool sed_cache_clearhtml( )

Clears HTML-cache


Information Tags:
Todo:  Add trigger support here to clean non-standard html fields

[ Top ]
sed_cache_get  [line 1503]

mixed sed_cache_get( string $name  )

Fetches cache value

Parameters:
string   $name:  Item name

API Tags:
Deprecated:  Deprecated since 0.7.0, use $cot_cache->db object instead


[ Top ]
sed_cache_getall  [line 1524]

mixed sed_cache_getall( [int $auto = 1]  )

Get all cache data and import it into global scope

Parameters:
int   $auto:  Only with autoload flag

API Tags:
Deprecated:  Deprecated since 0.7.0


[ Top ]
sed_cache_store  [line 1556]

bool sed_cache_store( string $name, mixed $value, int $expire, [int $auto = "1"]  )

Puts an item into cache

Parameters:
string   $name:  Item name
mixed   $value:  Item value
int   $expire:  Expires in seconds
int   $auto:  Autload flag

API Tags:
Deprecated:  Deprecated since 0.7.0, use $cot_cache->db object instead


[ Top ]


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