Skip to content
This repository has been archived by the owner on Jul 20, 2021. It is now read-only.

diversen/simple-db-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-db-cache

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

About

A very simple database key / value cache

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages