PageRender::getCacheFile() method

Get a CacheFile object corresponding to this Page

Note that this does not check if the page is cachable. This is so that if a cachable setting changes the cache can still be removed.

Usage

// basic usage
$cacheFile = $pageRender->getCacheFile($page);

// usage with all arguments
$cacheFile = $pageRender->getCacheFile($page, array $options = []);

Arguments

NameType(s)Description
pageint, Page

May provide page id (int) only if using for deleting a cache file. Must provide Page object otherwise.

options (optional)array

Return value

Exceptions

Method can throw exceptions on error:

  • WireException


PageRender methods and properties

API reference based on ProcessWire core version 3.0.236

Newest forum posts

Latest news

  • ProcessWire Weekly #541
    In the 541st issue of ProcessWire Weekly we'll share the latest core development news, check out a new module called Search Corrections, and more. Read on!
    Weekly.pw / 21 September 2024
  • Custom Fields Module
    This week we look at a new ProFields module named Custom Fields. This module provides a way to rapidly build out ProcessWire fields that contain any number of subfields/properties within them.
    Blog / 30 August 2024
  • Subscribe to weekly ProcessWire news

“The end client and designer love the ease at which they can update the website. Training beyond how to log in wasn’t even necessary since ProcessWire’s default interface is straightforward.” —Jonathan Lahijani