diversen/simple-db-cache

This package is abandoned and no longer maintained. No replacement package was suggested.

Very simple key / value cache using a PDO database

v5.0.0 2021-06-16 06:53 UTC

This package is auto-updated.

Last update: 2021-07-20 10:14:44 UTC


README

Very simple key / value cache using a PDO database

Database table

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.

Install

composer require diversen/simple-db-cache

Usage

test.php

License

MIT © Dennis Iversen