                 }
             };
 
-            FileSystemCacheStorageHelper.save(file, response.body, resultOrErrorCallback);
+            FileSystemCacheStorageHelper.save(_directory.resolvePath(key), response.body, resultOrErrorCallback);
 
             return true;
         }


            if (head != null)
            {
                if (head.link == null)
                {
                    try
                    {
                        head.link = _directory.resolvePath(key).url;
                    }
                    catch (error:Error)
                    {
                        // ignore error
                    }
                }

                return head;

        {
            var key:String = keyFromURL(url);

            try
            {
                response.head.link = key;
            }
            catch (error:Error)
            {
