Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Improve explanation of cache.app and cache.system#15827

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
umulmrum wants to merge1 commit intosymfony:4.4
base:4.4
Choose a base branch
Loading
fromumulmrum:system-and-app-cache

Conversation

umulmrum
Copy link
Contributor

This PR intends to clarify some things about cache.system and cache.app (#12774 among other things). Comments welcome of course :-)

@umulmrumumulmrum changed the base branch from5.4 to4.4September 17, 2021 14:56
@umulmrumumulmrum changed the titleImprove explanation of cache.app and cache.system[Cache] Improve explanation of cache.app and cache.systemSep 20, 2021
cache.rst Outdated

The system cache ``cache.system`` is used for things like annotations,
serializer, and validation. Usage is reserved for Symfony components
and you should not use it for application cache needs.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The application can also use it if it has its own data derived from the source code that can be generated during cache-warmup.

The rules for usingcache.system are:

  • the cached content does not need to change if the source code of the app does not change (i.e. it does not need to change between deployments)
  • the cached content has a CacheWarmer generating it (thecache.adapter.system is optimized for being read-only after the warm-up)

That's why it is used for the metadata of serializer and validation. But we could totally imagine applications that generate some metadata extracted from their source code (even though this is indeed more advanced use cases than the ones usingcache.app.

On the other hand,cache.app is independent from the deployment cycle of the source code (and generally needs to use a shared storage like Redis rather than the filesystem once you have multiple servers)

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@stof Thanks for commenting, I added your feedback to the PR.

@carsonbotcarsonbot changed the title[Cache] Improve explanation of cache.app and cache.systemImprove explanation of cache.app and cache.systemSep 15, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@stofstofstof left review comments

@stchrstchrstchr approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@umulmrum@stchr@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp