WP_Object_Cache::replace

SummerySummery

Replaces the contents in the cache, if contents already exist.

Syntax

WP_Object_Cache::replace( int|string $key, mixed $data, string $group = 'default', int $expire )

ParametersParameters

$key

(int|string) (Required) What to call the contents in the cache.

$data

(mixed) (Required) The contents to store in the cache.

$group

(string) (Optional) Where to group the cache contents.

Default value: 'default'

$expire

(int) (Optional) When to expire the cache contents. Default 0 (no expiration).

ReturnReturn

(bool) False if not exists, true if contents were replaced.

SourceSource

File: wp-includes/class-wp-object-cache.php


			

ChangelogChangelog

Changelog
Version Description
2.0.0 Introduced.

See alsoSee also

Scroll to Top