Function __global->has_caching_for
Definitions
sources/caches.php
- Check to see if caching is enabled.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: bool
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $type | string | No | No | required parameter | block lang comcode_page template | N/A | Cache type |
| $name | ?string | No | No | Null | N/A | N/A | The name (filename? codename?) of what we are using the cache for, so we can support low-level cache avoidance via URL parameter (null: none) |
Returns
- Whether it has the caching
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Check to see if caching is enabled.
*
* @param string $type Cache type
* @set block lang comcode_page template
* @param ?string $name The name (filename? codename?) of what we are using the cache for, so we can support low-level cache avoidance via URL parameter (null: none)
* @return boolean Whether it has the caching
*/
function has_caching_for(string $type, ?string $name = null) : bool
* Check to see if caching is enabled.
*
* @param string $type Cache type
* @set block lang comcode_page template
* @param ?string $name The name (filename? codename?) of what we are using the cache for, so we can support low-level cache avoidance via URL parameter (null: none)
* @return boolean Whether it has the caching
*/
function has_caching_for(string $type, ?string $name = null) : bool
sources/minikernel.php
- Check to see if caching is enabled.(In minikernel, this always returns true).
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: bool
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $type | string | No | No | required parameter | block lang comcode_page template | N/A | Cache type |
| $name | ?string | No | No | Null | N/A | N/A | The name (filename? codename?) of what we are using the cache for, so we can support low-level cache avoidance via URL parameter (null: none) |
Returns
- Whether it has the caching
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Check to see if caching is enabled.(In minikernel, this always returns true).
*
* @param string $type Cache type
* @set block lang comcode_page template
* @param ?string $name The name (filename? codename?) of what we are using the cache for, so we can support low-level cache avoidance via URL parameter (null: none)
* @return boolean Whether it has the caching
*/
function has_caching_for(string $type, ?string $name = null) : bool
* Check to see if caching is enabled.(In minikernel, this always returns true).
*
* @param string $type Cache type
* @set block lang comcode_page template
* @param ?string $name The name (filename? codename?) of what we are using the cache for, so we can support low-level cache avoidance via URL parameter (null: none)
* @return boolean Whether it has the caching
*/
function has_caching_for(string $type, ?string $name = null) : bool

