Changeset 5439 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-i18n.php
- Timestamp:
- 04/29/2017 08:35:49 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-i18n.php
r5438 r5439 10 10 11 11 /** 12 * @var string Global cache group for related caching 13 */ 14 public $i18n_cache_group = 'plugins-i18n'; 12 * @var string Global cache group for translations. 13 */ 14 const CACHE_GROUP = 'plugins-i18n'; 15 16 /** 17 * @var int When to expire the cache contents. 18 */ 19 const CACHE_EXPIRE = 3 * DAY_IN_SECONDS; 15 20 16 21 /** … … 55 60 */ 56 61 private function __construct() { 57 wp_cache_add_global_groups( $this->i18n_cache_group);62 wp_cache_add_global_groups( self::CACHE_GROUP ); 58 63 } 59 64 … … 97 102 $key = $this->cache_key( $slug, $branch, $suffix ); 98 103 99 return wp_cache_get( $key, $this->i18n_cache_group);104 return wp_cache_get( $key, self::CACHE_GROUP ); 100 105 } 101 106 … … 116 121 $key = $this->cache_key( $slug, $branch, $suffix ); 117 122 118 return wp_cache_set( $key, $content, $this->i18n_cache_group);123 return wp_cache_set( $key, $content, self::CACHE_GROUP, self::CACHE_EXPIRE ); 119 124 } 120 125
Note: See TracChangeset
for help on using the changeset viewer.