Changeset 2402 for trunk/phpgwapi/js
- Timestamp:
- 04/01/10 14:57:26 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpgwapi/js/expressoAjax/expressoAjax.js
r2328 r2402 42 42 this.oldY = 0; 43 43 this.updateVersion = ""; 44 this.cacheRequest = null; 44 45 this.connectorCache = { 45 46 'valid' : [], … … 516 517 } 517 518 } 519 cConnector.prototype.cacheNextRequest = function(expiration){ 520 if (typeof(expiration) == 'undefined') 521 expiration=0; 522 this.cacheRequest=expiration; 523 } 524 518 525 cConnector.prototype.addToCache = function(id,data){ 519 526 if (typeof(preferences) == "undefined" || preferences.use_cache != 'True') … … 522 529 if (func.indexOf('&') > 0) 523 530 func = func.substr(0,func.indexOf('&')); 524 switch ( func){525 // functions that enters in cache 526 case 'get_info_msg':531 switch (this.cacheRequest){ 532 // functions that enters in cache and never expires 533 case 0: 527 534 data.cacheHit = true; 528 case 'get_preferences':529 case 'getSharedUsersFrom':530 case 'get_organizations':531 case 'get_catalogs':532 case 'get_dropdown_contacts':533 case 'get_cc_contacts':534 case 'get_cc_groups':535 case 'getUsersByEmail':536 535 this.connectorCache.valid[id] = true; 537 536 this.connectorCache.result[id] = data; 538 537 break; 538 case 1: 539 539 // function that needs expire 540 case 'get_range_msgs2':541 case 'quicksearch':542 case 'get_folders_list':543 case 'search_msg':544 case 'search_for':545 540 this.connectorCache.valid[id] = true; 546 541 this.connectorCache.result[id] = data; 547 542 var i = this.expurgatedCache.length; 548 543 this.expurgatedCache[i+1] = id; 549 544 break; 545 case 2: 550 546 //functions that expires the cache 551 case 'move_messages':552 case 'delete_msgs':553 case 'getReturnExecuteForm':554 case 'set_messages_flag':555 case 'empty_trash':556 547 this.purgeCache(); 557 default: // no cache 548 default: 549 // no cache 558 550 break; 559 551 }
Note: See TracChangeset
for help on using the changeset viewer.