Merged in feature/MAW-855-import-code-into-aws (pull request #2)

code import from pantheon

* code import from pantheon
This commit is contained in:
Tony Volpe
2023-12-04 23:08:14 +00:00
parent 8c9b1312bc
commit 8f4b5efda6
4766 changed files with 185592 additions and 239967 deletions

View File

@@ -34,7 +34,7 @@ class WPCacheEngine implements CacheEngine {
*/
public function cache_object( string $key, $object, int $expiration, string $group = '' ): bool {
$prefixed_key = self::get_prefixed_key( $key, $group );
return wp_cache_set( $prefixed_key, $object, $group, $expiration );
return false !== wp_cache_set( $prefixed_key, $object, $group, $expiration );
}
/**
@@ -47,7 +47,7 @@ class WPCacheEngine implements CacheEngine {
*/
public function delete_cached_object( string $key, string $group = '' ): bool {
$prefixed_key = self::get_prefixed_key( $key, $group );
return wp_cache_delete( $prefixed_key, $group );
return false !== wp_cache_delete( $prefixed_key, $group );
}
/**
@@ -71,6 +71,6 @@ class WPCacheEngine implements CacheEngine {
* @return bool True if the group is deleted successfully, false otherwise.
*/
public function delete_cache_group( string $group = '' ): bool {
return self::invalidate_cache_group( $group );
return false !== self::invalidate_cache_group( $group );
}
}