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

21
LINES

< > BotCompany Repo | #1000480 // A cache component (draft)

Document

1  
A cache component
2  
3  
[[
4  
class Cache {
5  
  Object value;
6  
  Time loaded;
7  
  Function hasher;
8  
9  
  getLocal: return value;
10  
  getLocalHash: return hasher.process(value);
11  
  abstract load;
12  
  getFresh() {
13  
    load();
14  
    return value;
15  
  }
16  
}
17  
]]
18  
19  
"abstract" _ "load" _ ";"
20  
21  
etc...

download  show line numbers   

Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1000480
Snippet name: A cache component (draft)
Eternal ID of this version: #1000480/1
Text MD5: 289dd5eaa5cc2c5456adc8ade649cda1
Author: stefan
Category:
Type: Document
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-08-08 19:42:19
Source code size: 284 bytes / 21 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 542 / 144
Referenced in: [show references]