File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,14 @@ Changelog
33
44See also the [ GitHub releases page] ( https://github.com/FriendsOfSymfony/FOSHttpCache/releases ) .
55
6+ 2.5.1
7+ -----
8+
9+ ### Symfony
10+
11+ * Have cache invalidator check for presence of Psr6Store for a better guess
12+ whether the cache really is TagCapable or not.
13+
6142.5.0
715-----
816
Original file line number Diff line number Diff line change 2121use FOS \HttpCache \ProxyClient \Invalidation \RefreshCapable ;
2222use FOS \HttpCache \ProxyClient \Invalidation \TagCapable ;
2323use FOS \HttpCache \ProxyClient \ProxyClient ;
24+ use FOS \HttpCache \ProxyClient \Symfony ;
2425use Symfony \Component \EventDispatcher \EventDispatcher ;
2526use Symfony \Component \EventDispatcher \EventDispatcherInterface ;
27+ use Toflar \Psr6HttpCacheStore \Psr6Store ;
2628
2729/**
2830 * Manages HTTP cache invalidation.
@@ -97,7 +99,12 @@ public function supports($operation)
9799 case self ::INVALIDATE :
98100 return $ this ->cache instanceof BanCapable;
99101 case self ::TAGS :
100- return $ this ->cache instanceof TagCapable;
102+ $ supports = $ this ->cache instanceof TagCapable;
103+ if ($ supports && $ this ->cache instanceof Symfony) {
104+ return class_exists (Psr6Store::class);
105+ }
106+
107+ return $ supports ;
101108 default :
102109 throw new InvalidArgumentException ('Unknown operation ' .$ operation );
103110 }
You can’t perform that action at this time.
0 commit comments