factorize and move cache import logic to a static method, allow deleting inc/cache_import.php