@@ -37,9 +37,6 @@ public function initialize(): void
3737 {
3838 }
3939
40- /**
41- * {@inheritDoc}
42- */
4340 public function get (string $ key ): mixed
4441 {
4542 $ key = static ::validateKey ($ key , $ this ->prefix );
@@ -51,39 +48,27 @@ public function get(string $key): mixed
5148 return $ success ? $ data : null ;
5249 }
5350
54- /**
55- * {@inheritDoc}
56- */
5751 public function save (string $ key , $ value , int $ ttl = 60 ): bool
5852 {
5953 $ key = static ::validateKey ($ key , $ this ->prefix );
6054
6155 return apcu_store ($ key , $ value , $ ttl );
6256 }
6357
64- /**
65- * {@inheritDoc}
66- */
6758 public function remember (string $ key , int $ ttl , Closure $ callback ): mixed
6859 {
6960 $ key = static ::validateKey ($ key , $ this ->prefix );
7061
7162 return apcu_entry ($ key , $ callback , $ ttl );
7263 }
7364
74- /**
75- * {@inheritDoc}
76- */
7765 public function delete (string $ key ): bool
7866 {
7967 $ key = static ::validateKey ($ key , $ this ->prefix );
8068
8169 return apcu_delete ($ key );
8270 }
8371
84- /**
85- * {@inheritDoc}
86- */
8772 public function deleteMatching (string $ pattern ): int
8873 {
8974 $ matchedKeys = array_filter (
@@ -98,45 +83,30 @@ public function deleteMatching(string $pattern): int
9883 return 0 ;
9984 }
10085
101- /**
102- * {@inheritDoc}
103- */
10486 public function increment (string $ key , int $ offset = 1 ): false |int
10587 {
10688 $ key = static ::validateKey ($ key , $ this ->prefix );
10789
10890 return apcu_inc ($ key , $ offset );
10991 }
11092
111- /**
112- * {@inheritDoc}
113- */
11493 public function decrement (string $ key , int $ offset = 1 ): false |int
11594 {
11695 $ key = static ::validateKey ($ key , $ this ->prefix );
11796
11897 return apcu_dec ($ key , $ offset );
11998 }
12099
121- /**
122- * {@inheritDoc}
123- */
124100 public function clean (): bool
125101 {
126102 return apcu_clear_cache ();
127103 }
128104
129- /**
130- * {@inheritDoc}
131- */
132105 public function getCacheInfo (): array |false
133106 {
134107 return apcu_cache_info (true );
135108 }
136109
137- /**
138- * {@inheritDoc}
139- */
140110 public function getMetaData (string $ key ): ?array
141111 {
142112 $ key = static ::validateKey ($ key , $ this ->prefix );
@@ -153,9 +123,6 @@ public function getMetaData(string $key): ?array
153123 return null ;
154124 }
155125
156- /**
157- * {@inheritDoc}
158- */
159126 public function isSupported (): bool
160127 {
161128 return extension_loaded ('apcu ' ) && apcu_enabled ();
0 commit comments