php-temp-cache

Simple PHP caching class that uses the /tmp/ folder of a Linux system.

2 years after

TempCache Latest Stable Version License Monthly Downloads

A simple PHP caching class that uses the temporary files (/tmp/) folder of a Linux distribution.

Simple to Use

The class has been written to be dead easy to use and should be familiar to anyone who has used any caching before. However, beware that the main aim of this cache is not to be the fastest caching mechanism out there, but to simplify the lives of those who just want to have a simple caching system in place to avoid hitting API limits, although from my experience it is pretty fast!

Storing (put)

// $expire is time in seconds for validity.

TempCache::put($key, $value, $expire);

Retrieving (get)

TempCache::get($key);

Deleting (remove)

TempCache::remove($key);

Features

  • No need to install extra plugins or PHP modules.
  • Works out of the box. (As long as your web server use has enough privileges).
  • Extremely use to implement to avoid hitting those API limits.

Getting Started

Warning: You need PHP >= 5.3 to use TempCache.

Using Composer

{
    "require": {
        "cajogos/php-temp-cache": "1.0.1"
    }
}

Download and use

The class is self-contained so you can use it in any project you already have by using:

require_once 'classes/TempCache.php';

Contributors

Want to help contribute or thank me? Get in touch via [email protected].

You are awesome!

Related Repositories

ftp-deployment

ftp-deployment

A tool for automated deployment of web applications to an FTP server. ...

PHP-Auto-Update

PHP-Auto-Update

PHP auto-update class. Let the user upgrade their installations automatically. ...

shariff-backend-php

shariff-backend-php

PHP backend for Shariff. Shariff enables website users to share their favorite c ...

caching

caching

Cache layer with set of storages ...

docker-nginx-php

docker-nginx-php

Docker with Nginx / PHP-FPM 7, 5.6, 5.5. CentOS-7 based. ...