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
3
3
4
4
See also the [ GitHub releases page] ( https://github.com/FriendsOfSymfony/FOSHttpCache/releases ) .
5
5
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
+
6
14
2.5.0
7
15
-----
8
16
Original file line number Diff line number Diff line change 21
21
use FOS \HttpCache \ProxyClient \Invalidation \RefreshCapable ;
22
22
use FOS \HttpCache \ProxyClient \Invalidation \TagCapable ;
23
23
use FOS \HttpCache \ProxyClient \ProxyClient ;
24
+ use FOS \HttpCache \ProxyClient \Symfony ;
24
25
use Symfony \Component \EventDispatcher \EventDispatcher ;
25
26
use Symfony \Component \EventDispatcher \EventDispatcherInterface ;
27
+ use Toflar \Psr6HttpCacheStore \Psr6Store ;
26
28
27
29
/**
28
30
* Manages HTTP cache invalidation.
@@ -97,7 +99,12 @@ public function supports($operation)
97
99
case self ::INVALIDATE :
98
100
return $ this ->cache instanceof BanCapable;
99
101
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 ;
101
108
default :
102
109
throw new InvalidArgumentException ('Unknown operation ' .$ operation );
103
110
}
You can’t perform that action at this time.
0 commit comments