request ) ) { $cache_key_args[] = $wp_query->request; } $cache_key_args = array_filter( $cache_key_args ); $this->cache_key = md5( wp_json_encode( $cache_key_args ) ); $cache_group = 'ls_languages'; $this->cache = new WPML_WP_Cache( $cache_group ); } public function get() { $found = false; $result = $this->cache->get( $this->cache_key, $found ); if ( $found ) { return $result; } else { return null; } } public function set( $ls_languages ) { $this->cache->set( $this->cache_key, $ls_languages ); } }