Skip to content

Commit

Permalink
Merge pull request #18 from Thavarshan/fix/cache-polution-issue
Browse files Browse the repository at this point in the history
Fix/cache polution issue
  • Loading branch information
Thavarshan authored May 16, 2024
2 parents 3376c8a + 1194bee commit c1e4c21
Show file tree
Hide file tree
Showing 4 changed files with 825 additions and 100 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,17 @@ This request will return all posts with the status `active` and associated with

In your filter class, you can control caching by using the `enableCaching` static method. Set the `$useCache` static property to `true` to enable caching, or `false` to disable it. You can also customise the duration of the cache by modifying the `$cacheExpiration` property.`

> Caching is disabled by default.
```php
/**
* Indicates if caching should be used.
*
* @var bool
*/
protected static bool $useCache = false;
```

#### Enabling and Disabling Caching

- **Enable Caching**: To start caching, ensure that caching is enabled. This is typically done during the setup or dynamically based on the application context, such as only enabling caching in a production environment to improve performance and reduce database load.
Expand Down
2 changes: 1 addition & 1 deletion bin/analysis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ fi

# Run the phpstan analysis
echo "Running PHPStan analysis on $DIRECTORIES_TO_ANALYSE..."
$PHPSTAN_PATH analyse $DIRECTORIES_TO_ANALYSE -c ./phpstan.neon $XDEBUG_FLAG
php -d memory_limit=-1 $PHPSTAN_PATH analyse $DIRECTORIES_TO_ANALYSE -c ./phpstan.neon $XDEBUG_FLAG
Loading

0 comments on commit c1e4c21

Please sign in to comment.