25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
630B

  1. <?php
  2. namespace Framework\Cache\Driver;
  3. interface Driver
  4. {
  5. /**
  6. * Tell if a value is cached (still)
  7. */
  8. public function has(string $key): bool;
  9. /**
  10. * Get a cached value
  11. */
  12. public function get(string $key, mixed $default = null): mixed;
  13. /**
  14. * Put a value into the cache, for an optional number of seconds
  15. */
  16. public function put(string $key, mixed $value, int $seconds = null): static;
  17. /**
  18. * Remove a single cached value
  19. */
  20. public function forget(string $key): static;
  21. /**
  22. * Remove all cached values
  23. */
  24. public function flush(): static;
  25. }

Powered by TurnKey Linux.