Check if a page is cached?

Is it possible from let’s say a plugin to check if a page is cached (file cache) or not? How?

Something like this

if( is_cached() ) echo 'Page is cached';

Hmmm, wild guess, but maybe something like this:


or as in another core file it is used (not sure which works):


I did not get any of them to work.

As a sidenote a totally spammed your Github today:

Bastian made a comment about cacheId() here