Skip to content

Commit a24dfa9

Browse files
mnocondabrt
andauthored
Added more mentions about clearing persistence cache (#3174)
* Added more mentions about clearing persistence cache * Self review * Apply suggestions from code review Co-authored-by: Tomasz Dąbrowski <64841871+dabrt@users.noreply.github.com> * Vale remarks * Should -> consider comitting * Apply suggestion from @mnocon --------- Co-authored-by: Tomasz Dąbrowski <64841871+dabrt@users.noreply.github.com>
1 parent 75e40d2 commit a24dfa9

3 files changed

Lines changed: 38 additions & 7 deletions

File tree

docs/infrastructure_and_maintenance/cache/persistence_cache.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,20 @@ For more info on usage, see [Symfony Cache's documentation]([[= symfony_doc =]]/
278278

279279
### Clearing persistence cache
280280

281+
!!! caution "Always clear the persistence with `cache:pool:clear` command"
282+
283+
Running `php bin/console cache:clear` doesn't clear the persistence cache, even when you use a filesystem-based cache pool.
284+
285+
You must always clear the persistence cache by running:
286+
287+
```bash
288+
php bin/console cache:pool:clear <cache-pool>
289+
```
290+
291+
The default cache pool is named `cache.tagaware.filesystem`.
292+
The default cache pool when running Redis or Valkey is named `cache.redis`.
293+
If you have customized the persistence cache configuration, the name of your cache pool might be different.
294+
281295
Persistence cache prefixes it's cache using "ibx-". Clearing persistence cache can thus be done in the following ways:
282296

283297
``` php

docs/snippets/page_block_cache_clear.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
Persistence cache must be cleared after any modifications have been made to the block config in Page Builder, such as adding, removing or altering the page blocks, block attributes, validators or views configuration.
44

5-
To clear the persistence cache run `./bin/console cache:pool:clear [cache-pool]` command.
6-
The default cache-pool is named `cache.tagaware.filesystem`.
7-
The default cache-pool when running Redis or Valkey is named `cache.redis`.
5+
To clear the persistence cache, run `php bin/console cache:pool:clear <cache-pool>` command.
6+
The default cache pool is named `cache.tagaware.filesystem`.
7+
The default cache pool when running Redis or Valkey is named `cache.redis`.
88
If you have customized the [persistence cache configuration](https://doc.ibexa.co/en/latest/infrastructure_and_maintenance/cache/persistence_cache/#what-is-cached), the name of your cache pool might be different.
99

1010
In prod mode, you also need to clear the symfony cache by running `./bin/console c:c`.

docs/update_and_migration/from_5.0/update_from_5.0.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,16 +363,33 @@ Update Symfony constraints in `composer.json` before updating the packages.
363363
For more details about the new version, see the official Symfony [upgrade instructions](https://github.com/symfony/symfony/blob/7.4/UPGRADE-7.4.md) and [blog posts introducing this release](https://symfony.com/blog/category/living-on-the-edge/8.0-7.4).
364364
Key changes include:
365365

366-
- Array-based PHP configuration format
367-
368-
As part of the [array-based PHP configuration format](https://symfony.com/blog/new-in-symfony-7-4-better-php-configuration), a `config/reference.php` file will be created.
369-
You should commit this file to the repository.
370366

371367
- Independent application cache directory
372368

373369
Symfony 7.4 introduces a new [share directory](https://symfony.com/blog/new-in-symfony-7-4-share-directory), dedicated for storing application cache on the file system.
374370
If you decide to configure it (for example, by setting the `APP_SHARE_DIR` environment variable), review your existing scripts for explicit `var/cache` usage (for example, `rm -rf var/cache`) and decide whether to include `var/share` in the script.
375371

372+
!!! caution "Always clear the persistence cache with `cache:pool:clear` command"
373+
374+
Starting with Symfony 7.4, running `php bin/console cache:clear` doesn't clear the [[= product_name =]] persistence cache, even when using a filesystem-based cache pool.
375+
376+
To clear the persistence cache, for example after adding a [custom Page Builder block](create_custom_page_block.md), you must always run:
377+
378+
```bash
379+
php bin/console cache:pool:clear <cache-pool>
380+
```
381+
382+
The default cache pool is named `cache.tagaware.filesystem`.
383+
The default cache pool when running Redis or Valkey is named `cache.redis`.
384+
If you have customized the persistence cache configuration, the name of your cache pool might be different.
385+
386+
For more information about persistence cache, see [Persistence cache](persistence_cache.md).
387+
388+
- Array-based PHP configuration format
389+
390+
As part of the new [array-based PHP configuration format](https://symfony.com/blog/new-in-symfony-7-4-better-php-configuration), Symfony creates the `config/reference.php` file.
391+
Consider committing this file to the repository.
392+
376393
4. Update Ibexa packages by running:
377394

378395
=== "[[= product_name_headless =]]"

0 commit comments

Comments
 (0)