rest_url_details_cache_expiration WordPress Filter Hook

The rest_url_details_cache_expiration hook is used to change the expiration time for the cache of URL details used by the WordPress REST API. By default, this cache expires after 1 day, but this hook can be used to change that.

apply_filters( 'rest_url_details_cache_expiration', int $ttl ) #

Filters the cache expiration.


Description

Can be used to adjust the time until expiration in seconds for the cache of the data retrieved for the given URL.


Top ↑

Parameters

$ttl

(int)The time until cache expiration in seconds.


Top ↑

Source

File: wp-includes/rest-api/endpoints/class-wp-rest-url-details-controller.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.9.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.