[wp-trac] [WordPress Trac] #58919: Add a hook to set_cached_mo_files() to allow flexible caching strategies for globbing *.mo files

WordPress Trac noreply at wordpress.org
Wed Jul 26 22:35:26 UTC 2023


#58919: Add a hook to set_cached_mo_files() to allow flexible caching strategies
for globbing *.mo files
-------------------------+-----------------------------
 Reporter:  mreishus     |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  I18N         |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:
-------------------------+-----------------------------
Changes (by swissspidy):

 * keywords:   => has-patch
 * milestone:  Awaiting Review => Future Release


Comment:

 Thanks for your suggestion!

 We'd need to slightly change the filter name & usage to match existing
 patterns in core, but otherwise it looks reasonable.

 We could also make the caching built-in and simply revalidate the cache
 whenever translations get installed.

 Also, `get_available_languages` might need a similar change, though there
 are usually much less files at play for core translations.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58919#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list