Skip to content

Commit

Permalink
Simplify cache, add cache SWR support (#579)
Browse files Browse the repository at this point in the history
* Simplify the cache system to only use WordPress object cache

* Adding a flexible cache method

* CHANGELOG

* Delete cache config
  • Loading branch information
srtfisher authored Sep 6, 2024
1 parent 2216485 commit 0e215a2
Show file tree
Hide file tree
Showing 20 changed files with 624 additions and 746 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
been sent.
- Allow the block factory to override text when generating blocks.
- Added new `defer()` helper.
- Added `Cache::flexible()` method to add SWR support to the cache.

### Changed

- Dropped support for Redis as a cache backend in favor of the default object
cache drop-in.

## v1.1.3 - 2024-08-14

Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
"phpstan/phpdoc-parser": "^1.23.1",
"phpstan/phpstan": "1.10.67",
"phpunit/phpunit": "^9.3.3 || ^10.0.7 || ^11.0",
"predis/predis": "^2.2.0",
"rector/rector": "^1.0",
"squizlabs/php_codesniffer": "^3.7",
"symplify/monorepo-builder": "^10.3.3",
Expand Down
44 changes: 0 additions & 44 deletions config/cache.php

This file was deleted.

120 changes: 0 additions & 120 deletions src/mantle/cache/class-array-repository.php

This file was deleted.

87 changes: 0 additions & 87 deletions src/mantle/cache/class-cache-manager.php

This file was deleted.

5 changes: 1 addition & 4 deletions src/mantle/cache/class-cache-service-provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ class Cache_Service_Provider extends Service_Provider {
* Register the service provider.
*/
public function register(): void {
$this->app->singleton(
'cache',
fn ( $app) => new Cache_Manager( $app )
);
$this->app->singleton( 'cache', fn ( $app ) => new WordPress_Cache_Repository( $app ) );
}
}
Loading

0 comments on commit 0e215a2

Please sign in to comment.