Skip to content

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

Merged
merged 1 commit into from
Aug 13, 2014

Conversation

calumbrodie
Copy link
Contributor

// 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();

Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added

@dbu
Copy link
Contributor

dbu commented Aug 13, 2014

thanks!
it seems you missed some tests, look at the travis failures.

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
Copy link
Contributor

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...

Copy link
Contributor Author

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

@calumbrodie
Copy link
Contributor Author

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: FriendsOfSymfony/FOSHttpCache#119

@calumbrodie
Copy link
Contributor Author

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?)

@dbu
Copy link
Contributor

dbu commented Aug 13, 2014

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

@ddeboer
Copy link
Member

ddeboer commented Aug 13, 2014

👍

Please squash commits.

@calumbrodie
Copy link
Contributor Author

Squashed!

ddeboer added a commit that referenced this pull request Aug 13, 2014
Add headers as optional params while invalidating/refreshing
@ddeboer ddeboer merged commit 2be7986 into FriendsOfSymfony:master Aug 13, 2014
@ddeboer
Copy link
Member

ddeboer commented Aug 13, 2014

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants