The cache contents is grouped by the $group parameter followed by the
$key. This allows for duplicate ids in unique groups. Therefore, naming of
the group should be used with care and should follow normal function
naming guidelines outside of core WordPress usage.
The $expire parameter is not used, because the cache will automatically
expire for each time a page is accessed and PHP finishes. The method is
more for cache plugins which use files.
public set ( integer | string $key, mixed $data, string $group = 'default', integer $expire ) : boolean | ||
$key | integer | string | What to call the contents in the cache |
$data | mixed | The contents to store in the cache |
$group | string | Where to group the cache contents |
$expire | integer | TTL for the data, in seconds |
return | boolean | Always returns true |