Cache.php 3.8 KB

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