summary: cache logging and cache refactor
added: more logging statements
replaced: array_search() O(n^2) array comparison with O(n) lookup using an associative array
removed: unwanted-metric-string check from cache.php as it is already checked in graphitemodel.php