Skip to content

Update Cache component doc for 4.2 #11477

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 25, 2019

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Apr 24, 2019

From the plane to SymfonyLive Tunis :)

Fixes #9851

@nicolas-grekas nicolas-grekas changed the title Cache contracts Update Cache component doc for 4.2 Apr 24, 2019
@javiereguiluz javiereguiluz added this to the 4.2 milestone Apr 24, 2019
@nicolas-grekas nicolas-grekas force-pushed the cache-contracts branch 4 times, most recently from 92a31ac to c4d8431 Compare April 24, 2019 16:33
cache.rst Outdated
Each pool will manage a set of independent cache keys: keys of different pools
never collide even if they share the same backend. This is achieved by prefixing
keys with a namespace. This namespace is generated by hashing the name of the
pool, the name of the compiled container class and a configurable seed that XXX HOWTO LINK TO reference/configuration/framework.rst#prefix_seed? XXX
Copy link
Member Author

Choose a reason for hiding this comment

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

RST expert needed :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Will take care of this tomorrow 👌🏻

Copy link
Contributor

@OskarStark OskarStark Apr 25, 2019

Choose a reason for hiding this comment

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

Add this to reference/configuration.framework.rst file:

+ .. _reference-cache-prefix-seed

prefix_seed
...........

**type**: ``string`` **default**: ``null``

If defined, this value is used as part of the "namespace" generated for the
cache item keys. A common practice is to use the unique name of the application
(e.g. ``symfony.com``) because that prevents naming collisions when deploying
multiple applications into the same path (on different servers) that share the
same cache backend.

It's also useful when using `blue/green deployment`_ strategies and more
generally, when you need to abstract out the actual deployment directory (for
example, when warming caches offline).

And link it like this:

Suggested change
pool, the name of the compiled container class and a configurable seed that XXX HOWTO LINK TO reference/configuration/framework.rst#prefix_seed? XXX
pool, the name of the compiled container class and a :ref:`configurable seed <reference-cache-prefix-seed>`.

@weaverryan
Copy link
Member

Ok, I made some changes and hopefully added that link correctly ;). This is ready for review!

@weaverryan
Copy link
Member

Thank you Nicolas!

@weaverryan weaverryan merged commit 3209040 into symfony:4.2 Apr 25, 2019
weaverryan added a commit that referenced this pull request Apr 25, 2019
…averryan)

This PR was merged into the 4.2 branch.

Discussion
----------

 Update Cache component doc for 4.2

From the plane to SymfonyLive Tunis :)

Fixes #9851

Commits
-------

3209040 typo
4f7b9c4 Merge branch '4.2' into cache-contracts
50736c7 clarifying
d413993 tweaks
b2bb888 adding anchor
67243ff proofing cache chapter updates
808453a Update Cache component doc for 4.2
@nicolas-grekas nicolas-grekas deleted the cache-contracts branch June 15, 2019 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants