-
Notifications
You must be signed in to change notification settings - Fork 84
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
Conversation
// 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(); | ||
|
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.
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
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.
Added
thanks! can you also do a PR on https://github.com/FriendsOfSymfony/FOSHttpCache/blob/master/src/CacheInvalidator.php invalidatePath and invalidateTags ? |
@@ -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 |
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
Hi, I implemented it last night and will make a separate PR for it just now (that's why the Scrutinizer test are failing too): |
Edit: Scrutinizer will continue to fail until the dependencies are brought into line. I moved the dependency on HttpCache to use the new SHA instead of tag alpha-3, but reverted that as I'm unsure how you want to handle the updating of dependencies (its not really my place to make that change?) |
looks good. in terms of php its not an error to call the method with an extra parameter, so lets leave composer.json once the library 1.0.0 is tagged, we will update composer.json on the bundle to ask for 1.0.0 |
👍 Please squash commits. |
…CacheManager or CacheInvalidator
Squashed! |
Add headers as optional params while invalidating/refreshing
Thanks! |
As discussed in FriendsOfSymfony/FOSHttpCache#117
Depends on FriendsOfSymfony/FOSHttpCache#119