/** * * Caches a page for the current request so that other invocations of a_slot, a_area, * etc. can efficiently access it without another query. Also hydrates the page if the * data passed in is from an array-hydrated query (part of app_a_fasthydrate). Returns the * page object, particularly useful if you need to map it back to an object it is * associated with as part of fast hydration */ public static function cacheVirtualPage($pageInfo) { if (!is_object($pageInfo)) { // Fast hydration $page = new aPage(); $page->hydrate($pageInfo); // Cheap hydration of the slots happens here $page->populateSlotCache($pageInfo['Areas']); } else { $page = $pageInfo; } aTools::$globalCache[$page['slug']] = $page; return $page; }