Very simple key / value cache using a PDO database
You will need a database table, e.g. sqlite:
CREATE TABLE `cache_system` (
`id` varchar(64) NOT NULL,
`data` text,
`unix_ts` int(10) DEFAULT NULL,
PRIMARY KEY (`id`)
)
Or MySQL:
CREATE TABLE `cache_system` (
`id` varchar(64) NOT NULL,
`data` mediumtext,
`unix_ts` int(10) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `idx_system_cache` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
You can also use PostgreSQL and maybe other PDO supported databases.
composer require diversen/simple-db-cache
MIT © Dennis Iversen