This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[CODE LANGUAGE=CSHARP] | |
PUBLIC STATIC CLASS CACHEMANAGER { | |
PRIVATE STATIC CONCURRENTDICTIONARY < STRING, OBJECT > CACHELOCKS = | |
NEW CONCURRENTDICTIONARY < STRING, OBJECT > (); | |
PUBLIC STATIC EXPENSIVEOBJECT GETEXPENSIVEOBJECT() { | |
VAR CACHE = HTTPCONTEXT.CURRENT.CACHE; | |
VAR OBJ = CACHE[THE_KEY] AS EXPENSIVEOBJECT; | |
IF (OBJ == NULL) { | |
//GET A LOCK | |
VAR LOCKOBJECT = GETCACHELOCK(THE_KEY); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[CODE LANG=CSHARP] | |
PUBLIC STATIC CLASS CACHEMANAGER | |
{ | |
PUBLIC STATIC EXPENSIVEOBJECT GETEXPENSIVEOBJECT() | |
{ | |
VAR CACHE = HTTPCONTEXT.CURRENT.CACHE; | |
VAR OBJ = CACHE[THE_KEY] AS EXPENSIVEOBJECT; | |
IF (OBJ == NULL) | |
{ | |
OBJ = GETITFROMSOURCE(); |