|
6 | 6 |
|
7 | 7 | function opcache_reset(): bool {} |
8 | 8 |
|
| 9 | +function opcache_static_cache_volatile_reset(): bool {} |
| 10 | + |
9 | 11 | /** |
10 | 12 | * @return array<string, mixed>|false |
11 | 13 | * @refcount 1 |
@@ -63,7 +65,7 @@ private function __construct() {} |
63 | 65 | } |
64 | 66 |
|
65 | 67 | #[\Attribute(13)] /* TARGET_CLASS | TARGET_METHOD | TARGET_PROPERTY */ |
66 | | -final class PinnedStatic |
| 68 | +final class StableStatic |
67 | 69 | { |
68 | 70 | } |
69 | 71 |
|
@@ -92,68 +94,126 @@ final class VolatileStatic |
92 | 94 | public function __construct(int $ttl = 0, CacheStrategy $strategy = CacheStrategy::Immediate) {} |
93 | 95 | } |
94 | 96 |
|
95 | | -final class VolatileCache |
| 97 | +interface StaticCacheInterface |
96 | 98 | { |
97 | | - public static function get(string $key, null|bool|int|float|string|array|object $default = null): null|bool|int|float|string|array|object {} |
| 99 | + public static function getInstance(string $pool_name): static; |
| 100 | + |
| 101 | + public function fetch(string $key, null|bool|int|float|string|array|object $default = null): null|bool|int|float|string|array|object; |
98 | 102 |
|
99 | 103 | /** |
100 | 104 | * @return array<string, null|bool|int|float|string|array|object>|false |
101 | 105 | */ |
102 | | - public static function getMultiple(array $keys, ?array $default = null): array|false {} |
| 106 | + public function fetchMultiple(array $keys, ?array $default = null): array|false; |
| 107 | + |
| 108 | + public function store(string $key, null|bool|int|float|string|array|object $value): bool; |
| 109 | + |
| 110 | + public function storeMultiple(array $values): bool; |
| 111 | + |
| 112 | + public function has(string $key): bool; |
103 | 113 |
|
104 | | - public static function set(string $key, null|bool|int|float|string|array|object $value, int $ttl = 0): bool {} |
| 114 | + public function delete(string $key): bool; |
105 | 115 |
|
106 | | - public static function setMultiple(array $values, int $ttl = 0): bool {} |
| 116 | + public function deleteMultiple(array $keys): bool; |
107 | 117 |
|
108 | | - public static function has(string $key): bool {} |
| 118 | + public function clear(): bool; |
109 | 119 |
|
110 | | - public static function delete(string $key_or_class): bool {} |
| 120 | + public function lock(string $key, int $lease = 0): bool; |
111 | 121 |
|
112 | | - public static function deleteMultiple(array $keys): bool {} |
| 122 | + public function unlock(string $key): bool; |
113 | 123 |
|
114 | | - public static function clear(): bool {} |
| 124 | + public function getCacheStoreType(string $key): CacheStoreType; |
| 125 | + |
| 126 | + public static function info(): StaticCacheInfo; |
| 127 | + |
| 128 | + public static function getCacheStoreTypeByProperty(string $class_name, string $property_name): CacheStoreType; |
| 129 | + |
| 130 | + public static function getCacheStoreTypeByMethod(string $class_name, string $method_name, string $variable_name): CacheStoreType; |
| 131 | +} |
115 | 132 |
|
116 | | - public static function lock(string $key, int $lease = 0): bool {} |
| 133 | +/** @not-serializable */ |
| 134 | +final class VolatileCache implements StaticCacheInterface |
| 135 | +{ |
| 136 | + private function __construct() {} |
| 137 | + |
| 138 | + public static function getInstance(string $pool_name): static {} |
| 139 | + |
| 140 | + public function fetch(string $key, null|bool|int|float|string|array|object $default = null): null|bool|int|float|string|array|object {} |
| 141 | + |
| 142 | + /** |
| 143 | + * @return array<string, null|bool|int|float|string|array|object>|false |
| 144 | + */ |
| 145 | + public function fetchMultiple(array $keys, ?array $default = null): array|false {} |
117 | 146 |
|
118 | | - public static function unlock(string $key): bool {} |
| 147 | + public function store(string $key, null|bool|int|float|string|array|object $value): bool {} |
119 | 148 |
|
120 | | - public static function getCacheStoreType(string $key_or_property, ?string $class_name = null): CacheStoreType {} |
| 149 | + public function storeMultiple(array $values): bool {} |
| 150 | + |
| 151 | + public function has(string $key): bool {} |
| 152 | + |
| 153 | + public function delete(string $key): bool {} |
| 154 | + |
| 155 | + public function deleteMultiple(array $keys): bool {} |
| 156 | + |
| 157 | + public function clear(): bool {} |
| 158 | + |
| 159 | + public function lock(string $key, int $lease = 0): bool {} |
| 160 | + |
| 161 | + public function unlock(string $key): bool {} |
| 162 | + |
| 163 | + public function getCacheStoreType(string $key): CacheStoreType {} |
121 | 164 |
|
122 | 165 | public static function info(): StaticCacheInfo {} |
| 166 | + |
| 167 | + public static function getCacheStoreTypeByProperty(string $class_name, string $property_name): CacheStoreType {} |
| 168 | + |
| 169 | + public static function getCacheStoreTypeByMethod(string $class_name, string $method_name, string $variable_name): CacheStoreType {} |
123 | 170 | } |
124 | 171 |
|
125 | | -final class PinnedCache |
| 172 | +/** @not-serializable */ |
| 173 | +final class StableCache implements StaticCacheInterface |
126 | 174 | { |
127 | | - public static function get(string $key, null|bool|int|float|string|array|object $default = null): null|bool|int|float|string|array|object {} |
| 175 | + private function __construct() {} |
| 176 | + |
| 177 | + public static function getInstance(string $pool_name): static {} |
| 178 | + |
| 179 | + public function fetch(string $key, null|bool|int|float|string|array|object $default = null): null|bool|int|float|string|array|object {} |
128 | 180 |
|
129 | 181 | /** |
130 | 182 | * @return array<string, null|bool|int|float|string|array|object>|false |
131 | 183 | */ |
132 | | - public static function getMultiple(array $keys, ?array $default = null): array|false {} |
| 184 | + public function fetchMultiple(array $keys, ?array $default = null): array|false {} |
133 | 185 |
|
134 | | - public static function set(string $key, null|bool|int|float|string|array|object $value): bool {} |
| 186 | + public function store(string $key, null|bool|int|float|string|array|object $value): bool {} |
135 | 187 |
|
136 | | - public static function setMultiple(array $values): bool {} |
| 188 | + public function storeMultiple(array $values): bool {} |
137 | 189 |
|
138 | | - public static function has(string $key): bool {} |
| 190 | + public function storeWithTtl(string $key, null|bool|int|float|string|array|object $value, int $ttl): bool {} |
139 | 191 |
|
140 | | - public static function delete(string $key_or_class): bool {} |
| 192 | + public function storeMultipleWithTtl(array $values, int $ttl): bool {} |
141 | 193 |
|
142 | | - public static function deleteMultiple(array $keys): bool {} |
| 194 | + public function has(string $key): bool {} |
143 | 195 |
|
144 | | - public static function clear(): bool {} |
| 196 | + public function delete(string $key): bool {} |
145 | 197 |
|
146 | | - public static function lock(string $key, int $lease = 0): bool {} |
| 198 | + public function deleteMultiple(array $keys): bool {} |
147 | 199 |
|
148 | | - public static function unlock(string $key): bool {} |
| 200 | + public function clear(): bool {} |
149 | 201 |
|
150 | | - public static function increment(string $key, int $step = 1): int|false {} |
| 202 | + public function lock(string $key, int $lease = 0): bool {} |
151 | 203 |
|
152 | | - public static function decrement(string $key, int $step = 1): int|false {} |
| 204 | + public function unlock(string $key): bool {} |
153 | 205 |
|
154 | | - public static function getCacheStoreType(string $key_or_property, ?string $class_name = null): CacheStoreType {} |
| 206 | + public function increment(string $key, int $step = 1): int|false {} |
| 207 | + |
| 208 | + public function decrement(string $key, int $step = 1): int|false {} |
| 209 | + |
| 210 | + public function getCacheStoreType(string $key): CacheStoreType {} |
155 | 211 |
|
156 | 212 | public static function info(): StaticCacheInfo {} |
| 213 | + |
| 214 | + public static function getCacheStoreTypeByProperty(string $class_name, string $property_name): CacheStoreType {} |
| 215 | + |
| 216 | + public static function getCacheStoreTypeByMethod(string $class_name, string $method_name, string $variable_name): CacheStoreType {} |
157 | 217 | } |
158 | 218 |
|
159 | 219 | } |
0 commit comments