Location: PHPKode > scripts > keeper > Example2.php
<?php
require_once 'Keeper.php';
/*
 * The repetitive requests to the database...
 */
$query = "SELECT * FROM `users` WHERE `id`=12";
$key = md5($query);
if (Keeper::exists($key)) {
	$array = Keeper::get($key);
} else {
	$array = mysql_fetch_assoc(mysql_query($query));
	Keeper::set($key, $array);
}
Return current item: keeper