2017 © Pedro Peláez
 

library php-proxy-plugin-cache

Cache Plugin for PHP-Proxy

image

athlon1600/php-proxy-plugin-cache

Cache Plugin for PHP-Proxy

  • Wednesday, August 12, 2015
  • by Athlon1600
  • Repository
  • 2 Watchers
  • 4 Stars
  • 17 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Cache Plugin for PHP-Proxy Application

Provides caching support for PHP-Proxy application. Cache Plugin as of this moment only supports memory storage., (*1)

Installation

Install Redis Server:, (*2)

apt-get install redis-server

Start the server if not already started, (*3)

/etc/init.d/redis-server start

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

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

Install the new composer package:, (*5)

composer update

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

$config['plugins'] = array(
    'Cache', // <--- new plugin
    'HeaderRewrite',
    'Stream',
    .....
);

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

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:, (*8)

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

The Versions

12/08 2015

dev-master

9999999-dev https://www.php-proxy.com/

Cache Plugin for PHP-Proxy

  Sources   Download

MIT

The Requires