Store.php 416 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. *
  4. *
  5. * @author walkor <worker-man@qq.com>
  6. *
  7. */
  8. class Store
  9. {
  10. public static function set($key, $value, $ttl = 0)
  11. {
  12. $key = strval($key);
  13. return apc_store($key, $value);
  14. }
  15. public static function get($key)
  16. {
  17. return apc_fetch($key);
  18. }
  19. public static function delete($key)
  20. {
  21. $key = strval($key);
  22. return apc_delete($key);
  23. }
  24. }