added array cache
deleted query for each part (decode and rewrite part)
file_exists -> is_file
added array cache
deleted query for each part (decode and rewrite part)