- ⌂ Content Type
- Methods
ContentType::recache_method()
Update all cached metadata object method values for a content type.
Content Type methods can also be recached from the CLI with refresh_cache.
Prototype
void recache_method(string $method, boolean $clear = FALSE, int $batch = 1000)
Parameters
- method - Name of the method to recache. Recognized methods are:
- Key
- Description
- Icon
- Keywords
- Summary
- clear - If TRUE, clear and update the method. If FALSE (default), just update the method if not populated.
- batch - The number of objects to update per call. Default is 1000. -1 = unlimited
Example
$repo = comand::repo();
$ct = $repo->get_content_type('User');
$ct->recache_method('Description');