Copyright (C) by Hugo Leisink
This file is part of the Banshee PHP framework
http://www.banshee-php.org/
// Create a Memcache object $memcache = new Memcache; // Connect to the Memcached server $memcache->connect('localhost', 11211); // Store data in cache for 10 minutes with key 'users' $memcache->set('users', $data, false, 600); // Retrieve data from cache with key 'users' $data = $memcache->get('users');
// Store data in cache for 10 minutes with key 'users' apcu_store('users', $data, 600); // Retrieve data from cache with key 'users' $data = apcu_fetch('users');
// Create a Redis connection $redis = new Redis(); // Connect to Redis server $redis->connect('localhost', 6379); // Set data in cache for 10 minutes with key 'users' $redis->set('users', $data, 600); // Retrieve data from cache with key 'users' $data = $redis->get('users');Package library: Redis PHP extension.