set( '#keys', serialize( $keys ) ); foreach ( $array as $key => $value ) { $value = serialize( $value ); $cache->set( $key, $value ); } $cache->close(); } /** * Validate a name. * * @param string $name Which file to use. * @return bool */ public static function isValidCdbName( $name ) { return preg_match( '/^[a-zA-Z_-]{1,100}$/', $name ); } /** * Get a full path to file in a known location. * * @param string $name Which file to use. * @return string */ public static function getCdbPath( $name ) { return TranslateUtils::cacheFile( "messagechanges.$name.cdb" ); } }