@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | { |
| 25 | 25 | $cacheKey = self::_getCacheKey($method, $parameters); |
| 26 | 26 | $expire = $this->getExpire($method); |
| 27 | - $closure = function () use ($method, $parameters) { |
|
| 27 | + $closure = function() use ($method, $parameters) { |
|
| 28 | 28 | return call_user_func_array([$this, $method], $parameters); |
| 29 | 29 | }; |
| 30 | 30 | try { |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | * @param $method |
| 85 | 85 | * @return bool |
| 86 | 86 | */ |
| 87 | - public function forgetMethodCache($method){ |
|
| 87 | + public function forgetMethodCache($method) { |
|
| 88 | 88 | $cacheName = self::_getCacheKeyPrefixLevel2($method) . '*'; |
| 89 | 89 | $redis = Cache::getRedis(); |
| 90 | 90 | $keys = $redis->keys($cacheName); |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | * get cache level1 prefix |
| 99 | 99 | * @return string |
| 100 | 100 | */ |
| 101 | - private static function _getCacheKeyPrefixLevel1(){ |
|
| 101 | + private static function _getCacheKeyPrefixLevel1() { |
|
| 102 | 102 | return __CLASS__ . ":"; |
| 103 | 103 | } |
| 104 | 104 | |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | * @param $method |
| 108 | 108 | * @return string |
| 109 | 109 | */ |
| 110 | - private static function _getCacheKeyPrefixLevel2($method){ |
|
| 110 | + private static function _getCacheKeyPrefixLevel2($method) { |
|
| 111 | 111 | return self::_getCacheKeyPrefixLevel1() . $method . ":"; |
| 112 | 112 | } |
| 113 | 113 | |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | * @param $params |
| 118 | 118 | * @return string |
| 119 | 119 | */ |
| 120 | - private static function _getCacheKey($method, $params){ |
|
| 120 | + private static function _getCacheKey($method, $params) { |
|
| 121 | 121 | return self::_getCacheKeyPrefixLevel2($method) . md5(json_encode($params)); |
| 122 | 122 | } |
| 123 | 123 | |