Advertisement
Guest User

Untitled

a guest
Sep 27th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. var scriptProperties = PropertiesService.getScriptProperties();
  2.  
  3. if(getCachedVariable(variableName) == null){
  4. // Results aren't in cache, get them and save them
  5. scriptProperties.setProperty(variableName,value);
  6. }
  7. return getCachedVariable(variableName);
  8.  
  9. function getCachedVariable(variableName){
  10. return scriptProperties.getProperty(variableName);
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement