{"action":"created","issue":{"url":"https://api.github.com/repos/googleapis/nodejs-storage/issues/152","repository_url":"https://api.github.com/repos/googleapis/nodejs-storage","labels_url":"https://api.github.com/repos/googleapis/nodejs-storage/issues/152/labels{/name}","comments_url":"https://api.github.com/repos/googleapis/nodejs-storage/issues/152/comments","events_url":"https://api.github.com/repos/googleapis/nodejs-storage/issues/152/events","html_url":"https://github.com/googleapis/nodejs-storage/issues/152","id":304315049,"number":152,"title":"File is still available using the old URL after a copy()/move()","user":{"login":"pkyeck","id":870980,"avatar_url":"https://avatars0.githubusercontent.com/u/870980?v=4","gravatar_id":"","url":"https://api.github.com/users/pkyeck","html_url":"https://github.com/pkyeck","followers_url":"https://api.github.com/users/pkyeck/followers","following_url":"https://api.github.com/users/pkyeck/following{/other_user}","gists_url":"https://api.github.com/users/pkyeck/gists{/gist_id}","starred_url":"https://api.github.com/users/pkyeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkyeck/subscriptions","organizations_url":"https://api.github.com/users/pkyeck/orgs","repos_url":"https://api.github.com/users/pkyeck/repos","events_url":"https://api.github.com/users/pkyeck/events{/privacy}","received_events_url":"https://api.github.com/users/pkyeck/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-12T10:27:44Z","updated_at":"2018-03-12T15:22:15Z","closed_at":null,"author_association":"NONE","body":"Hi, this is more a question than a bug, but I was hoping someone around here can shed some light on this.\r\n\r\nWhen I `file.move()` to basically make the file not publicly accessible (at least not under the same URL) anymore, the moved file is cached and can be accessed for quite some time. Even doing a `file.makePrivate()` before moving the file doesn't change that. What is the exact time-delay and is there a way around this? Thanks."},"comment":{"url":"https://api.github.com/repos/googleapis/nodejs-storage/issues/comments/372348092","html_url":"https://github.com/googleapis/nodejs-storage/issues/152#issuecomment-372348092","issue_url":"https://api.github.com/repos/googleapis/nodejs-storage/issues/152","id":372348092,"user":{"login":"stephenplusplus","id":723048,"avatar_url":"https://avatars0.githubusercontent.com/u/723048?v=4","gravatar_id":"","url":"https://api.github.com/users/stephenplusplus","html_url":"https://github.com/stephenplusplus","followers_url":"https://api.github.com/users/stephenplusplus/followers","following_url":"https://api.github.com/users/stephenplusplus/following{/other_user}","gists_url":"https://api.github.com/users/stephenplusplus/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenplusplus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenplusplus/subscriptions","organizations_url":"https://api.github.com/users/stephenplusplus/orgs","repos_url":"https://api.github.com/users/stephenplusplus/repos","events_url":"https://api.github.com/users/stephenplusplus/events{/privacy}","received_events_url":"https://api.github.com/users/stephenplusplus/received_events","type":"User","site_admin":false},"created_at":"2018-03-12T15:22:15Z","updated_at":"2018-03-12T15:22:15Z","author_association":"MEMBER","body":"I put together a simple test, and I'm seeing that the expected results:\r\n\r\n```js\r\nvar file = bucket.file('file-original');\r\nvar fileMoved = bucket.file('file-moved');\r\n\r\nfile.save('Test', function(err) {\r\n  if (err) throw err\r\n\r\n  file.move(fileMoved, function(err) {\r\n    if (err) throw err\r\n\r\n    file.exists(function(err, exists) {\r\n      if (err) throw err\r\n\r\n      console.log('Old file exists?', exists)\r\n\r\n      fileMoved.exists(function(err, exists) {\r\n        if (err) throw err\r\n\r\n        console.log('New file exists?', exists)\r\n      });\r\n    });\r\n  });\r\n});\r\n```\r\n```\r\nexists? false\r\nexists? true\r\n```\r\n\r\nHow long have you tried waiting before seeing that the old file was removed?"}}
{"actor":{"display_login":"stephenplusplus"}}