@@ -26,11 +26,11 @@ class Cache extends Plugin
2626 public function read ($ name , $ version = null )
2727 {
2828 $ fullName = ($ version ? "$ name/ $ version " : "$ name/* " );
29- $ this ->client ->getLogger ()->info (" BedrockCache read " , [
29+ $ this ->client ->getLogger ()->info (' BedrockCache read ' , [
3030 'key ' => $ name ,
3131 'version ' => $ version ,
3232 ]);
33- $ response = $ this ->call (" ReadCache " , [" name " => $ fullName ]);
33+ $ response = $ this ->call (' ReadCache ' , [' name ' => $ fullName ]);
3434 if ($ response ['code ' ] === 404 ) {
3535 throw new NotFound ('The cache entry could not be found ' , 666 );
3636 }
@@ -41,10 +41,7 @@ public function read($name, $version = null)
4141 * Reads from the cache, but if it does not find the entry, it returns the passed default.
4242 *
4343 * @param string $name
44- * @param mixed $default
4544 * @param string $version
46- *
47- * @return mixed
4845 */
4946 public function readWithDefault ($ name , $ default , $ version = null )
5047 {
@@ -58,10 +55,6 @@ public function readWithDefault($name, $default, $version = null)
5855 /**
5956 * Gets data from a cache, if it is not present, it computes it by calling $computeFunction and saves the result in the cache.
6057 *
61- * @param string $name
62- * @param null|string $version
63- * @param callable $computeFunction
64- *
6558 * @return array
6659 */
6760 public function get (string $ name , ?string $ version , callable $ computeFunction )
@@ -96,14 +89,14 @@ public function write($name, $value, $version = null, array $headers = [])
9689 // If we have a version, invalidate previous versions
9790 if ($ version ) {
9891 // Invalidate all other versions of this name before setting
99- $ headers [" invalidateName " ] = "$ name/* " ;
100- $ headers [" name " ] = "$ name/ $ version " ;
92+ $ headers [' invalidateName ' ] = "$ name/* " ;
93+ $ headers [' name ' ] = "$ name/ $ version " ;
10194 } else {
10295 // Just set this name
103- $ headers [" name " ] = "$ name/ " ;
96+ $ headers [' name ' ] = "$ name/ " ;
10497 }
10598
106- $ this ->call (" WriteCache " , $ headers , json_encode ($ value ));
99+ $ this ->call (' WriteCache ' , $ headers , json_encode ($ value ));
107100 }
108101
109102 /**
0 commit comments