Upgrade to 3.3.0

This commit is contained in:
Bastian Allgeier
2019-11-05 09:35:58 +01:00
parent 447a9dd266
commit a431716732
186 changed files with 3068 additions and 1458 deletions

View File

@@ -2,7 +2,7 @@
namespace Kirby\Cache;
use APCUIterator;
use APCuIterator;
/**
* APCu Cache Driver
@@ -19,7 +19,7 @@ class ApcuCache extends Cache
* Determines if an item exists in the cache
*
* @param string $key
* @return boolean
* @return bool
*/
public function exists(string $key): bool
{
@@ -30,12 +30,12 @@ class ApcuCache extends Cache
* Flushes the entire cache and returns
* whether the operation was successful
*
* @return boolean
* @return bool
*/
public function flush(): bool
{
if (empty($this->options['prefix']) === false) {
return apcu_delete(new APCUIterator('!^' . preg_quote($this->options['prefix']) . '!'));
return apcu_delete(new APCuIterator('!^' . preg_quote($this->options['prefix']) . '!'));
} else {
return apcu_clear_cache();
}
@@ -46,7 +46,7 @@ class ApcuCache extends Cache
* whether the operation was successful
*
* @param string $key
* @return boolean
* @return bool
*/
public function remove(string $key): bool
{
@@ -77,7 +77,7 @@ class ApcuCache extends Cache
* @param string $key
* @param mixed $value
* @param int $minutes
* @return boolean
* @return bool
*/
public function set(string $key, $value, int $minutes = 0): bool
{

View File

@@ -45,14 +45,14 @@ abstract class Cache
* @param string $key
* @param mixed $value
* @param int $minutes
* @return boolean
* @return bool
*/
abstract public function set(string $key, $value, int $minutes = 0): bool;
/**
* Adds the prefix to the key if given
*
* @param string $key
* @param string $key
* @return string
*/
protected function key(string $key): string
@@ -152,7 +152,7 @@ abstract class Cache
* Checks if an item in the cache is expired
*
* @param string $key
* @return boolean
* @return bool
*/
public function expired(string $key): bool
{
@@ -204,7 +204,7 @@ abstract class Cache
* Determines if an item exists in the cache
*
* @param string $key
* @return boolean
* @return bool
*/
public function exists(string $key): bool
{
@@ -217,7 +217,7 @@ abstract class Cache
* this needs to be defined by the driver
*
* @param string $key
* @return boolean
* @return bool
*/
abstract public function remove(string $key): bool;
@@ -226,7 +226,7 @@ abstract class Cache
* whether the operation was successful;
* this needs to be defined by the driver
*
* @return boolean
* @return bool
*/
abstract public function flush(): bool;

View File

@@ -78,7 +78,7 @@ class FileCache extends Cache
* @param string $key
* @param mixed $value
* @param int $minutes
* @return boolean
* @return bool
*/
public function set(string $key, $value, int $minutes = 0): bool
{
@@ -125,7 +125,7 @@ class FileCache extends Cache
* whether the operation was successful
*
* @param string $key
* @return boolean
* @return bool
*/
public function remove(string $key): bool
{
@@ -142,7 +142,7 @@ class FileCache extends Cache
* Flushes the entire cache and returns
* whether the operation was successful
*
* @return boolean
* @return bool
*/
public function flush(): bool
{

View File

@@ -52,7 +52,7 @@ class MemCached extends Cache
* @param string $key
* @param mixed $value
* @param int $minutes
* @return boolean
* @return bool
*/
public function set(string $key, $value, int $minutes = 0): bool
{
@@ -76,7 +76,7 @@ class MemCached extends Cache
* whether the operation was successful
*
* @param string $key
* @return boolean
* @return bool
*/
public function remove(string $key): bool
{
@@ -88,7 +88,7 @@ class MemCached extends Cache
* whether the operation was successful;
* WARNING: Memcached only supports flushing the whole cache at once!
*
* @return boolean
* @return bool
*/
public function flush(): bool
{

View File

@@ -31,7 +31,7 @@ class MemoryCache extends Cache
* @param string $key
* @param mixed $value
* @param int $minutes
* @return boolean
* @return bool
*/
public function set(string $key, $value, int $minutes = 0): bool
{
@@ -56,7 +56,7 @@ class MemoryCache extends Cache
* whether the operation was successful
*
* @param string $key
* @return boolean
* @return bool
*/
public function remove(string $key): bool
{
@@ -72,7 +72,7 @@ class MemoryCache extends Cache
* Flushes the entire cache and returns
* whether the operation was successful
*
* @return boolean
* @return bool
*/
public function flush(): bool
{

View File

@@ -25,7 +25,7 @@ class NullCache extends Cache
* @param string $key
* @param mixed $value
* @param int $minutes
* @return boolean
* @return bool
*/
public function set(string $key, $value, int $minutes = 0): bool
{
@@ -49,7 +49,7 @@ class NullCache extends Cache
* whether the operation was successful
*
* @param string $key
* @return boolean
* @return bool
*/
public function remove(string $key): bool
{
@@ -60,7 +60,7 @@ class NullCache extends Cache
* Flushes the entire cache and returns
* whether the operation was successful
*
* @return boolean
* @return bool
*/
public function flush(): bool
{