var Store = {
    asa: {
        name: 'Asa',
        age: 24
    }
};

var Jack = {
    config: {
      0: {
        storage: 'memory',
        life: 5000
      },
      1: {
        storage: 'session',
        life: 20000
      }
    },
    get: function(key) {
        return Store[key];
    },
    set: function(key, value, type) {
      type = type || 0;
      var config = this.config[type];
      Store[key] = value;
      setTimeout(function() {
        delete Store[key];
      }, config.life);
    }
};

@@ -7,18 +7,16 @@
 ore = %7B%0A
-  
   asa: %7B
@@ -12,26 +12,24 @@
  %7B%0A  asa: %7B%0A
-  
       name: 
@@ -41,18 +41,16 @@
 ,%0A      
-  
 age: 24%0A
@@ -55,16 +55,34 @@
 4%0A  
- 
- 
 %7D%0A%7D;%0A%0A
+var Removers = %7B%7D;%0A%0A
 var 
@@ -160,9 +160,9 @@
 fe: 
-5
+1
 000%0A
@@ -227,10 +227,9 @@
 fe: 
-20
+5
 000%0A
@@ -438,80 +438,381 @@
     
-setTimeout(function() %7B%0A        delete Store%5Bkey%5D;%0A      %7D, config.life)
+this.setupCleanup(key, config);%0A    %7D,%0A    setupCleanup: function(key, config) %7B%0A      if(Removers%5Bkey%5D) %7B%0A        clearTimeout(Removers%5Bkey%5D.id);%0A      %7D%0A      var remove = function() %7B%0A        delete Store%5Bkey%5D;%0A        delete Removers%5Bkey%5D;%0A      %7D;%0A      var id = setTimeout(remove, config.life);%0A      Removers%5Bkey%5D = %7B%0A        id: id,%0A        callback: remove%0A      %7D
 ;%0A  

Work on poc