@@ -17,8 +17,6 @@ final class CacheRuntime
1717
1818 private ?float $ epochReadAt = null ;
1919
20- private ?string $ schemaEpoch = null ;
21-
2220 private ?bool $ runtimeDisabled = null ;
2321
2422 public function __construct (
@@ -123,39 +121,16 @@ public function fail(\Throwable $exception): void
123121 $ this ->failures ->cacheUnavailable ($ exception );
124122 }
125123
126- public function schemaEpoch (): string
127- {
128- if ($ this ->schemaEpoch !== null ) {
129- return $ this ->schemaEpoch ;
130- }
131-
132- $ this ->resolveState ();
133-
134- return $ this ->schemaEpoch ??= $ this ->store ->getRaw ($ this ->keys ->schemaEpoch ()) ?? '0 ' ;
135- }
136-
137- public function rememberSchemaEpoch (string $ epoch ): void
138- {
139- $ this ->schemaEpoch = $ epoch ;
140- }
141-
142- public function forgetSchemaEpoch (): void
143- {
144- $ this ->schemaEpoch = null ;
145- }
146-
147124 /** @return array{0: string, 1: bool} */
148125 private function resolveState (): array
149126 {
150127 if ($ this ->epoch === null || $ this ->epochExpired ()) {
151128 $ epochKey = $ this ->keys ->epoch ();
152129 $ disabledKey = $ this ->keys ->disabled ();
153- $ schemaEpochKey = $ this ->keys ->schemaEpoch ();
154- $ values = $ this ->store ->mget ([$ epochKey , $ disabledKey , $ schemaEpochKey ]);
130+ $ values = $ this ->store ->mget ([$ epochKey , $ disabledKey ]);
155131 $ this ->epoch = $ values [$ epochKey ] ?? '0 ' ;
156132 $ this ->epochReadAt = microtime (true );
157133 $ this ->runtimeDisabled ??= ($ values [$ disabledKey ] ?? null ) !== null ;
158- $ this ->schemaEpoch ??= $ values [$ schemaEpochKey ] ?? '0 ' ;
159134 }
160135
161136 return [$ this ->epoch , $ this ->runtimeDisabled ?? false ];
0 commit comments