Created
June 12, 2014 08:50
-
-
Save augustyip/ff366429ad110a2a38c8 to your computer and use it in GitHub Desktop.
perRequestCache
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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