Skip to content

Instantly share code, notes, and snippets.

@augustyip
Created June 12, 2014 08:50
Show Gist options
  • Save augustyip/ff366429ad110a2a38c8 to your computer and use it in GitHub Desktop.
Save augustyip/ff366429ad110a2a38c8 to your computer and use it in GitHub Desktop.
perRequestCache
<?php
Class perRequestCache {
private static $cache = array();
public static function get($key) {
return self::$cache[$key];
}
public static function set($key, $value) {
self::$cache[$key] = $value;
}
public static function exist($key) {
return array_key_exists($key, self::$cache);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment