Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was 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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.