wp_options code>)中删除过期的旧瞬态,以防止它们使数据库膨胀甚至使网站变慢。 p>Unless you are using an object cache (like memcached), WordPress stores transient records in the options table.
除非您使用对象缓存(如memcached),否则WordPress将瞬态记录存储在options表中。
Many transients are given an expiration time, so in theory they should disappear after some time.
许多瞬态都有一个到期时间,因此理论上它们应该在一段时间后消失。
In practise, because old transients are only deleted when requested again after they’ve expired, many transients stay in the database.
实际上,由于旧的瞬变仅在过期后再次请求时才被删除,因此许多瞬变会保留在数据库中。
After a while, there can be thousands or even millions of expired transients needlessly taking up space in your options table, depending on what your plugins are doing.
一段时间后,可能有成千上万的过期瞬态不必要地占用了选项表中的空间,具体取决于您的插件在做什么。 p>
Delete Expired Transients schedules a daily task to delete any expired transients from the options table.
删除过期的瞬变计划一个日常任务,以从选项表中删除任何过期的瞬变。
It performs this operation with a single SQL query, and then runs a second query to find any orphaned expiration records and deletes them too.
它使用单个SQL查询执行此操作,然后运行第二个查询以查找任何孤立的到期记录并删除它们。 p>
There are a few other plugins around that clean up expired transients.
周围还有一些其他插件可以清除过期的瞬变。
This one is written for fast performance, set-and-forget scheduled housekeeping, and maximum compatibility.
编写此文件是为了实现快速性能,设置并忘记预定的内务处理以及最大的兼容性。
It uses the PHP time to determine whether transients are expired, not the database time (which can be different).
它使用PHP时间来确定瞬变是否已过期,而不是数据库时间(可以不同)。
It does only one job, and it does it well with the minimum of resources.
它只做一项工作,而且用最少的资源就能很好地完成工作。 p>
Now optimised for WordPress Multisite.
现在针对WordPress多站点进行了优化。 p>
Translations
翻译 h3>
Many thanks to the generous efforts of our translators:
非常感谢我们翻译人员的慷慨努力: p>