paths = $paths; $this->mtime = $mtime; $this->cache_buster = $cache_buster; } public function jsonSerialize(): array { return array( 'paths' => $this->paths, 'mtime' => $this->mtime, 'cache_buster' => $this->cache_buster, ); } public function get_paths() { return $this->paths; } public static function jsonUnserialize( $data ) { $instance = new self(); $instance->set( $data['paths'], $data['mtime'], $data['cache_buster'] ); return $instance; } protected function generate_cache_id() { $hash = md5( implode( ',', $this->paths ) . '_' . $this->mtime . '_' . $this->cache_buster ); // Keep cache id small as option keys have a character limit. return substr( $hash, 0, 10 ); } protected static function cache_prefix() { return 'concat_paths_'; } }