Author: ssmaeklu
Date: 2007-06-14 09:25:30 +0200 (Thu, 14 Jun 2007)
New Revision: 5324
Modified:
branches/2.13/core-api/src/main/java/no/schibstedsok/searchportal/view/velocity/QuickResourceManagerImpl.java
Log:
Improved to keep updates of a resource from pilingup
Modified:
branches/2.13/core-api/src/main/java/no/schibstedsok/searchportal/view/velocity/QuickResourceManagerImpl.java
===================================================================
---
branches/2.13/core-api/src/main/java/no/schibstedsok/searchportal/view/velocity/QuickResourceManagerImpl.java
2007-06-13 17:37:22 UTC (rev 5323)
+++
branches/2.13/core-api/src/main/java/no/schibstedsok/searchportal/view/velocity/QuickResourceManagerImpl.java
2007-06-14 07:25:30 UTC (rev 5324)
@@ -45,6 +45,10 @@
final Resource resource = globalCache.get(type + name);
if (resource != null) {
+ // Touch the resource so that a closely following caller won't
trigger an update thread. Keeps updates of
+ // the same resource from piling up when traffic is high.
+ resource.touch();
+
// Use cached resource for this invocation but also start a thread
to update cache with a brand new
// resource instance.
if (resource.requiresChecking()) {
_______________________________________________
Kernel-commits mailing list
[email protected]
http://sesat.no/mailman/listinfo/kernel-commits