Programmatically expiring pages from cache

Hi. I know I can use Cache::set or Cache::get to cache my own objects. But is there a way to force the eviction of a page from the C5 cache ?

The use case would be that the user approves page B. I catch the event. I know that page A depends on some attributes of page B and that it isn't up to date anymore, so I would like to evict page A from cache - like a Cache::delete, but I don't know arguments I would need.
I know I could use a short duration cache, but updates will occur only a few times a week, so I would like to avoid degrading performances.

Any idea if this is possible ?

View Replies: View Best Answer
hutman replied on at Permalink Best Answer Reply
You can do

use PageCache;

Passing in a page ($c) will purge that page from the cache.
dangrth replied on at Permalink Reply
That simple ! :) Thank you, I'm still trying to get around the documentation from Concrete5 and still missing stuff like this...