The signals from the social networks are cached in the standard for new posts (not older than 30 days) up to 15 minutes. This time can be adjusted using the following filter:
In this case, the cache is valid for 2 hours.
The return value determines the duration. The actual value is measured in seconds. If the return is “10”, the validity of the cached is exactly 10 seconds. There are several predefined constants (e.g., HOUR_IN_SECONDS) of WordPress which can be used:
MINUTE_IN_SECONDS = 60 (seconds)
HOUR_IN_SECONDS = 60 * MINUTE_IN_SECONDS
DAY_IN_SECONDS = 24 * HOUR_IN_SECONDS
WEEK_IN_SECONDS = 7 * DAY_IN_SECONDS
YEAR_IN_SECONDS = 365 * DAY_IN_SECONDS
Further information is available here.
Was this article helpful?