Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

8
LINES

< > BotCompany Repo | #1021366 // simpleWikipedia_cached - disk-cached raw source of an Simple English Wikipedia topic

JavaX fragment (include)

1  
sS simpleWikipedia_cached(S topic) {
2  
  File f = newFile(simpleWikipedia_cacheDir(), uniqueFileNameUsingMD5_80(topic));
3  
  if (fileExists(f)) ret loadTextFile(f);
4  
  S page = simpleWikipedia(topic);
5  
  saveTextFile(f, page);
6  
  setFileMetaField(f, "Topic", topic);
7  
  ret page;
8  
}

Author comment

Began life as a copy of #1014113

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, whxojlpjdney

No comments. add comment

Snippet ID: #1021366
Snippet name: simpleWikipedia_cached - disk-cached raw source of an Simple English Wikipedia topic
Eternal ID of this version: #1021366/5
Text MD5: 3e2fd70cb49af7ede4aa3d54ff8fbd8a
Author: stefan
Category: javax / networking
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-03-03 18:57:55
Source code size: 280 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 286 / 336
Version history: 4 change(s)
Referenced in: [show references]