Group Abstract Group Abstract

Message Boards Message Boards

[?]  Refresh or clear cached CloudObjects[]?

Posted 8 years ago

cross posted on mathematica.stackexchange.com

Let's create an API which creates one file each time it is called/accessed:

obj = CloudDeploy[
  APIFunction[{}
  , Put[$RequesterWolframID
    , "testFiles/" <> DateString["ISODateTime"] <> ".txt"
    ] &
  ]
, "apiTest"
, Permissions -> "Public"
];

CloudEvaluate@CreateDirectory@"testFiles/";

and let's call it:

URLRead[obj]
CloudObjects["testFiles/"]
URLRead[obj]
CloudObjects["testFiles/"]

enter image description here

But this is not true, if you visit a browser interface they will be there:

enter image description here

In fact, once you visit it, CloudObjects cache changes, but only once:

URLRead[obj]
CloudObjects["testFiles/"]
URLRead[obj]
CloudObjects["testFiles/"]

enter image description here

So how to make sure CloudObjects returns up to date result?

I am fine with an additional step to flush the cache, I just want it to be possible programmatically.

POSTED BY: Kuba Podkalicki
4 Replies
POSTED BY: Richard Hennigan
POSTED BY: Kuba Podkalicki
Posted 8 years ago
POSTED BY: Joel Klein

Thanks for feedback, will use IconRules just in case. Would be nice to be able to read more about cloud objects 'configuration' step, what is involved for different types of them etc.

p.s. I do not check for every write but for every OpenAppend.

POSTED BY: Kuba Podkalicki
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard