dev-master 2015-08-12 00:00 UTC

This package is auto-updated.

Last update: 2024-06-19 08:26:14 UTC


Cache Plugin for PHP-Proxy Application

Provides caching support for PHP-Proxy application. Cache Plugin as of this moment only supports memory storage.


Install Redis Server:

apt-get install redis-server

Start the server if not already started

/etc/init.d/redis-server start

Find the composer.json file in your proxy directory, and add this package as one of its requirements:

"require": {
	"athlon1600/php-proxy": "@dev",
	"athlon1600/php-proxy-plugin-cache": "@dev"

Install the new composer package:

composer update

Final step, find the config.php file in that same directory, and add Cache to the list of plugins to be loaded.

$config['plugins'] = array(
	'Cache', // <--- new plugin

Cache plugin has to be loaded first, so must appear first in the list otherwise it won't work.

Redis Configuration

By default, Redis is configured to store everything it's being sent, however on a busy proxy that tends to overload the memory with all those caches files. For best performance, adjust redis memory settings and set appropriate key eviction policy. This should be good enough on a server with 1 GB ram:

root@uk1:/# redis-cli> config set maxmemory 300000000
OK> config set maxmemory-policy volatile-lru