Cache.php 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. namespace Illuminate\Support\Facades;
  3. /**
  4. * @method static \Illuminate\Contracts\Cache\Repository store(string|null $name = null)
  5. * @method static \Illuminate\Contracts\Cache\Repository driver(string|null $driver = null)
  6. * @method static \Illuminate\Contracts\Cache\Repository memo(string|null $driver = null)
  7. * @method static \Illuminate\Contracts\Cache\Repository resolve(string $name)
  8. * @method static \Illuminate\Cache\Repository build(array $config)
  9. * @method static \Illuminate\Cache\Repository repository(\Illuminate\Contracts\Cache\Store $store, array $config = [])
  10. * @method static void refreshEventDispatcher()
  11. * @method static string getDefaultDriver()
  12. * @method static void setDefaultDriver(string $name)
  13. * @method static \Illuminate\Cache\CacheManager forgetDriver(array|string|null $name = null)
  14. * @method static void purge(string|null $name = null)
  15. * @method static \Illuminate\Cache\CacheManager extend(string $driver, \Closure $callback)
  16. * @method static \Illuminate\Cache\CacheManager setApplication(\Illuminate\Contracts\Foundation\Application $app)
  17. * @method static bool has(array|string $key)
  18. * @method static bool missing(string $key)
  19. * @method static mixed get(array|string $key, mixed $default = null)
  20. * @method static array many(array $keys)
  21. * @method static iterable getMultiple(iterable $keys, mixed $default = null)
  22. * @method static mixed pull(array|string $key, mixed $default = null)
  23. * @method static bool put(array|string $key, mixed $value, \DateTimeInterface|\DateInterval|int|null $ttl = null)
  24. * @method static bool set(string $key, mixed $value, null|int|\DateInterval $ttl = null)
  25. * @method static bool putMany(array $values, \DateTimeInterface|\DateInterval|int|null $ttl = null)
  26. * @method static bool setMultiple(iterable $values, null|int|\DateInterval $ttl = null)
  27. * @method static bool add(string $key, mixed $value, \DateTimeInterface|\DateInterval|int|null $ttl = null)
  28. * @method static int|bool increment(string $key, mixed $value = 1)
  29. * @method static int|bool decrement(string $key, mixed $value = 1)
  30. * @method static bool forever(string $key, mixed $value)
  31. * @method static mixed remember(string $key, \Closure|\DateTimeInterface|\DateInterval|int|null $ttl, \Closure $callback)
  32. * @method static mixed sear(string $key, \Closure $callback)
  33. * @method static mixed rememberForever(string $key, \Closure $callback)
  34. * @method static mixed flexible(string $key, array $ttl, callable $callback, array|null $lock = null, bool $alwaysDefer = false)
  35. * @method static bool forget(string $key)
  36. * @method static bool delete(string $key)
  37. * @method static bool deleteMultiple(iterable $keys)
  38. * @method static bool clear()
  39. * @method static \Illuminate\Cache\TaggedCache tags(mixed $names)
  40. * @method static string|null getName()
  41. * @method static bool supportsTags()
  42. * @method static int|null getDefaultCacheTime()
  43. * @method static \Illuminate\Cache\Repository setDefaultCacheTime(int|null $seconds)
  44. * @method static \Illuminate\Contracts\Cache\Store getStore()
  45. * @method static \Illuminate\Cache\Repository setStore(\Illuminate\Contracts\Cache\Store $store)
  46. * @method static \Illuminate\Contracts\Events\Dispatcher|null getEventDispatcher()
  47. * @method static void setEventDispatcher(\Illuminate\Contracts\Events\Dispatcher $events)
  48. * @method static void macro(string $name, object|callable $macro)
  49. * @method static void mixin(object $mixin, bool $replace = true)
  50. * @method static bool hasMacro(string $name)
  51. * @method static void flushMacros()
  52. * @method static mixed macroCall(string $method, array $parameters)
  53. * @method static bool flush()
  54. * @method static string getPrefix()
  55. * @method static \Illuminate\Contracts\Cache\Lock lock(string $name, int $seconds = 0, string|null $owner = null)
  56. * @method static \Illuminate\Contracts\Cache\Lock restoreLock(string $name, string $owner)
  57. *
  58. * @see \Illuminate\Cache\CacheManager
  59. * @see \Illuminate\Cache\Repository
  60. */
  61. class Cache extends Facade
  62. {
  63. /**
  64. * Get the registered name of the component.
  65. *
  66. * @return string
  67. */
  68. protected static function getFacadeAccessor()
  69. {
  70. return 'cache';
  71. }
  72. }