Cache.php 792 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. class Cache
  3. {
  4. private function createCacheKey($key, $isUserValue, $userId = null) {
  5. $CC_CONFIG = Config::getConfig();
  6. $a = $CC_CONFIG["apiKey"][0];
  7. if ($isUserValue) {
  8. $cacheKey = "{$key}{$userId}{$a}";
  9. }
  10. else {
  11. $cacheKey = "{$key}{$a}";
  12. }
  13. return $cacheKey;
  14. }
  15. public function store($key, $value, $isUserValue, $userId = null) {
  16. //$cacheKey = self::createCacheKey($key, $userId);
  17. return false; ///apc_store($cacheKey, $value);
  18. }
  19. public function fetch($key, $isUserValue, $userId = null) {
  20. //$cacheKey = self::createCacheKey($key, $isUserValue, $userId);
  21. return false; //apc_fetch($cacheKey);
  22. }
  23. public static function clear() {
  24. // Disabled on SaaS
  25. // apc_clear_cache('user');
  26. // apc_clear_cache();
  27. }
  28. }