1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-07 07:16:51 +02:00

Add new $pages->cache()->hasCache($page_id) method

This commit is contained in:
Ryan Cramer
2024-11-15 14:27:30 -05:00
parent ec8943c26d
commit 6c8ca289ba

View File

@@ -91,6 +91,18 @@ class PagesLoaderCache extends Wire {
return $page;
}
/**
* Is given page ID in the cache?
*
* @param int page ID
* @return bool
* @since 3.0.243
*
*/
public function hasCache($id) {
return isset($this->pageIdCache[$id]);
}
/**
* Cache the given page.
*