How to purge “public cached URI” programmatically?
-
I have set the public cache URI to “^/graphql”, which make it cache any GET requests that match the pattern “^/graphql”.
For example:
GET https://example.com/graphql?query=foo GET https://example.com/graphql?query=bar GET https://example.com/graphql?query=foobarWhat I want to do is that purging specific cache for example the cache for
GET https://example.com/graphql?query=fooafter a specific post has been saved.Currently, to purge the cache for “^/graphql?query=XXX” I have to do a “purge all” action, which is not what I want, that purges too much…
I want to purge the cache for specific URI programmatically.I have read https://docs.litespeedtech.com/lscache/lscwp/api/ , I’m sure it can be achieved by utilizing the hooks some how… could you show me some sample code for implementing this? Thanks!
The topic ‘How to purge “public cached URI” programmatically?’ is closed to new replies.