[ Index ]
 

Code source de PHP PEAR 1.4.5

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/Cache/Container/ -> dbx.php (sommaire)

(pas de description)

Poids: 303 lignes (10 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 1 fichier
 Cache/Container.php

Définit 1 class

Cache_Container_dbx:: (7 méthodes):
  Cache_Container_dbx()
  fetch()
  save()
  remove()
  flush()
  idExists()
  garbageCollection()


Classe: Cache_Container_dbx  - X-Ref

ext/dbx Cache Container.

WARNING: Other systems might or might not support certain datatypes of
the tables shown. As far as I know there's no large binary
type in SQL-92 or SQL-99. Postgres seems to lack any
BLOB or TEXT type, for MS-SQL you could use IMAGE, don't know
about other databases. Please add sugestions for other databases to
the inline docs.

The field 'changed' has no meaning for the Cache itself. It's just there
because it's a good idea to have an automatically updated timestamp
field for debugging in all of your tables.

For _MySQL_ you need this DB table:

CREATE TABLE cache (
id          CHAR(32) NOT NULL DEFAULT '',
cachegroup  VARCHAR(127) NOT NULL DEFAULT '',
cachedata   BLOB NOT NULL DEFAULT '',
userdata    VARCHAR(255) NOT NULL DEFAULT '',
expires     INT(9) NOT NULL DEFAULT 0,

changed     TIMESTAMP(14) NOT NULL,

INDEX (expires),
PRIMARY KEY (id, cachegroup)
)

Cache_Container_dbx($options)   X-Ref
Pas de description

fetch($id, $group)   X-Ref
Pas de description

save($id, $data, $expires, $group, $userdata)   X-Ref
Stores a dataset.

WARNING: we use the SQL command REPLACE INTO this might be
MySQL specific. As MySQL is very popular the method should
work fine for 95% of you.

remove($id, $group)   X-Ref
Pas de description

flush($group = '')   X-Ref
Pas de description

idExists($id, $group)   X-Ref
Pas de description

garbageCollection($maxlifetime)   X-Ref
Pas de description



Généré le : Sun Feb 25 14:08:00 2007 par Balluche grâce à PHPXref 0.7