concrete/src/Cache/Page/PageCache.php
public function getCacheKey($mixed)
    {
        if ($mixed instanceof ConcretePage) {
            $collectionPath = trim((string) $mixed->getCollectionPath(), '/');
            if ($collectionPath !== '') {
                return urlencode($collectionPath);
            }
            $cID = $mixed->getCollectionID();
            if ($cID && $cID == ConcretePage::getHomePageID()) {
                return '!' . $cID;
            }
        } elseif ($mixed instanceof Request) {
            $path = trim((string) $mixed->getPath(), '/');
            if ($path !== '') {
                return urlencode($path);
            }

            return '!' . ConcretePage::getHomePageID();
        } elseif ($mixed instanceof PageCacheRecord) {
            return $mixed->getCacheRecordKey();
        }
    }
public function getCacheKey($mixed)
    {
        if ($mixed instanceof ConcretePage) {
            $collectionPath = trim((string) $mixed->getCollectionPath(), '/');
            if ($collectionPath !== '') {
                return urlencode($collectionPath);
            }
            $cID = $mixed->getCollectionID();
            if ($cID && $cID == ConcretePage::getHomePageID()) {
                return '!' . $cID;
            }
        } elseif ($mixed instanceof Request) {
            $path = trim((string) $mixed->getPath(), '/');
            if ($path !== '') {
                return urlencode($path);
            }

            return '!' . ConcretePage::getHomePageID();
        } elseif ($mixed instanceof PageCacheRecord) {
            return $mixed->getCacheRecordKey();
        }
    }
public function getCacheKey ( $ mixed ) { if ( $ mixed instanceof ConcretePage ) { $ collectionPath = trim ( ( string ) $ mixed -> getCollectionPath ( ) , '/' ) ; if ( $ collectionPath !== '' ) { return urlencode ( $ collectionPath ) ; } $ cID = $ mixed -> getCollectionID ( ) ; if ( $ cID && $ cID == ConcretePage :: getHomePageID ( ) ) { return '!' . $ cID ; } } elseif ( $ mixed instanceof Request ) { $ path = trim ( ( string ) $ mixed -> getPath ( ) , '/' ) ; if ( $ path !== '' ) { return urlencode ( $ path ) ; } return '!' . ConcretePage :: getHomePageID ( ) ; } elseif ( $ mixed instanceof PageCacheRecord ) { return $ mixed -> getCacheRecordKey ( ) ; } }
Get the key that identifies the cache entry for a page or a request.

@param \Concrete\Core\Page\Page|\Concrete\Core\Http\Request|\Concrete\Core\Cache\Page\PageCacheRecord|mixed $mixed

@return string|null Returns NULL if $mixed is not a recognized type, a string otherwise
Get the key that identifies the cache entry for a page or a request .