Changeset 1878
- Timestamp:
- 04/12/12 11:52:51 (12 years ago)
- Location:
- MDService2/branches/MDService_simple3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
MDService2/branches/MDService_simple3/WorkspaceProfile.xml
r1874 r1878 7 7 <WorkspaceProfile user="server"> 8 8 <Repositories> 9 <item> 9 <!-- 10 <item> 10 11 <name>clarin.at-mirror</name> 11 12 <id>52</id> 12 13 <type>md</type> 13 14 <uri>http://clarin.aac.ac.at/exist/rest/db/clarin/cmd-model.xql/</uri> 14 </item> 15 </item> 16 --> 17 15 18 <item> 16 19 <name>clarin.eu:mdrepo</name> -
MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/action/GenericAction.java
r1852 r1878 559 559 loadParams(); 560 560 561 561 562 setTargetProxy(); 562 563 if (checkTargetProxy()) { … … 578 579 579 580 //Caching 580 if (getCache().equals(Cache.SKIP)) { 581 sourceStream = getSourceStream(); 582 } else { 583 if (getCache().equals(Cache.USE)) { 581 if (getFormat().equals("htmljspage")) { 582 setSourceStream(WorkspaceProfile.createStream("htmljspage")); 583 } else { 584 585 if (getCache().equals(Cache.SKIP)) { 586 sourceStream = getSourceStream(); 587 } else { 588 if (getCache().equals(Cache.USE)) { 589 sourceStream = Cache.getCache().getFromCache(req_key); 590 } 591 if (sourceStream == null) { // either not in cache or cache_flag=refresh 592 long startMillis = System.currentTimeMillis(); 593 sourceStream = getSourceStream(); 594 duration = System.currentTimeMillis() - startMillis; 595 req_key = addDurationKey(); 596 String xcid = Cache.getCache().putInCache(req_key,sourceStream); 597 log.debug("putting in cache: " + req_key + ", " + xcid); 584 598 sourceStream = Cache.getCache().getFromCache(req_key); 599 } else { 600 log.debug("reading from cache: " + req_key); 601 } 585 602 } 586 if (sourceStream == null) { // either not in cache or cache_flag=refresh587 long startMillis = System.currentTimeMillis();588 sourceStream = getSourceStream();589 duration = System.currentTimeMillis() - startMillis;590 req_key = addDurationKey();591 String xcid = Cache.getCache().putInCache(req_key,sourceStream);592 log.debug("putting in cache: " + req_key + ", " + xcid);593 sourceStream = Cache.getCache().getFromCache(req_key);594 } else {595 log.debug("reading from cache: " + req_key);596 }597 603 } 604 598 605 599 606 // append diagnostics to sourcestream
Note: See TracChangeset
for help on using the changeset viewer.