Resolve AT Protocol DIDs, handles, and schemas with intelligent caching for Laravel
1<?php
2
3namespace SocialDept\AtpResolver\Contracts;
4
5interface CacheStore
6{
7 /**
8 * Get a cached value.
9 *
10 * @param string $key
11 * @return mixed
12 */
13 public function get(string $key): mixed;
14
15 /**
16 * Store a value in the cache.
17 *
18 * @param string $key
19 * @param mixed $value
20 * @param int $ttl Time to live in seconds
21 */
22 public function put(string $key, mixed $value, int $ttl): void;
23
24 /**
25 * Check if a key exists in the cache.
26 *
27 * @param string $key
28 */
29 public function has(string $key): bool;
30
31 /**
32 * Remove a value from the cache.
33 *
34 * @param string $key
35 */
36 public function forget(string $key): void;
37
38 /**
39 * Clear all cached values.
40 */
41 public function flush(): void;
42}