2017 © Pedro PelĂĄez
 

library doctrine-cache-provider

Library to add a Doctrine Provider to allow Doctrine Cache to connect to databases.

image

lavoiesl/doctrine-cache-provider

Library to add a Doctrine Provider to allow Doctrine Cache to connect to databases.

  • Tuesday, April 8, 2014
  • by lavoiesl
  • Repository
  • 1 Watchers
  • 0 Stars
  • 71 Installations
  • PHP
  • 1 Dependents
  • 1 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Doctrine Cache Provider

Build Status, (*1)

Library to add a Doctrine Provider to allow Doctrine Cache to connect to databases., (*2)

This can be useful for a poor man's distributed cache system., (*3)

Uses Doctrine DBAL and serialize., (*4)

See http://doctrine-dbal.readthedocs.org/en/latest/reference/configuration.html, (*5)

Usage

 'mydb',
    'user' => 'user',
    'password' => 'secret',
    'host' => 'localhost',
    'driver' => 'pdo_mysql',
);
$conn = \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config);


// DoctrineCache config
$fields = array(
    'id'         => 'name',
    'data'       => 'data',
    'expiration' => 'expiration',
);

$cache = new DoctrineCache($conn, 'my_table_cache', $fields);
$cache->save('key', $value, $ttl);
$cache->fetch('key');

?>

Configuration

You need to have a working database and the proper table. A schema tool is included:, (*6)


Running tests

To run the MySQL test, you need to have a test database with user test and password test., (*7)

TODO

Include tests for other Doctrine drivers, (*8)

Author

The Versions

08/04 2014

dev-master

9999999-dev

Library to add a Doctrine Provider to allow Doctrine Cache to connect to databases.

  Sources   Download

MIT

The Requires

 

08/04 2014

v1.1

1.1.0.0

Library to add a Doctrine Provider to allow Doctrine Cache to connect to databases.

  Sources   Download

MIT

The Requires

 

07/04 2014

v1.0

1.0.0.0

Library to add a Doctrine Provider to allow Doctrine Cache to connect to databases.

  Sources   Download

MIT

The Requires