-
Notifications
You must be signed in to change notification settings - Fork 82
Add headers as optional params while invalidating/refreshing #131
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,7 @@ Cache Manager | |
| ------------- | ||
|
|
||
| To invalidate single paths, URLs and routes manually, use the | ||
| ``invalidatePath($path)`` and ``invalidateRoute($route, $params)`` methods on | ||
| ``invalidatePath($path, $headers)`` and ``invalidateRoute($route, $params, $headers)`` methods on | ||
| the cache manager:: | ||
|
|
||
| $cacheManager = $container->get('fos_http_cache.cache_manager'); | ||
|
|
@@ -32,6 +32,10 @@ the cache manager:: | |
| // Invalidate a route | ||
| $cacheManager->invalidateRoute('user_details', array('id' => 123))->flush(); | ||
|
|
||
| // Invalidate a route or path with headers | ||
| $cacheManager->invalidatePath('/users', array('X-Foo' => 'bar'))->flush(); | ||
| $cacheManager->invalidateRoute('user_details', array('id' => 123), array('X-Foo' => 'bar'))->flush(); | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should do a similar note here as ddboer did in the other PR, linking to http://foshttpcachebundle.readthedocs.org/en/latest/reference/configuration/proxy-client.html#custom-guzzle-client
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added |
||
| To invalidate multiple representations matching a regular expression, call | ||
| ``invalidateRegex($path, $contentType, $hosts)``:: | ||
|
|
||
|
|
@@ -41,6 +45,13 @@ To refresh paths and routes, you can use ``refreshPath($path)`` and | |
| ``refreshRoute($route, $params)`` in a similar manner. See | ||
| :doc:`/reference/cache-manager` for more information. | ||
|
|
||
|
|
||
| By default, the proxy clients instantiate a `Guzzle client`_ to communicate | ||
| with the caching proxy. If you need to customize the requests, for example to | ||
| send a basic authentication header, you can inject a custom Guzzle client:: | ||
| See the | ||
| :doc:`/reference/configuration/proxy-client#custom-guzzle-client` configuration reference. | ||
|
|
||
| .. _invalidation configuration: | ||
|
|
||
| Configuration | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you did not implement this yet, its on the FOSHttpCache library, not the bundle...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR now submitted to FOSHttpCache bundle