Skip to content

VladaHejda/NetteDatabaseStorage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NetteDatabase Storage

Install

#1

Download src/NetteDatabaseStorage.php.

#2

Create cache table in your database (see mysql.cache.sql or postgres.cache.sql, you can adapt script for another database server (not tested); you can change table name).

#3

Instantiate Nette\Caching\Cache:

$context = new \Nette\Database\Context(...);
$storage = new \Nette\Caching\Storages\DatabaseStorage($context, 'cache_table_name');
$cache = new \Nette\Caching\Cache($storage);

#4

Use it.

About

NetteDatabase Storage

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages