[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
How to avoid 404 and 500 url caching  XML
Forum Index -> Ehcache
Author Message
develop

neo

Joined: 04/15/2012 22:29:28
Messages: 5
Offline

Hello friends,

I am using ehcache for url base webcache it's working fine, my application was every 20 mint cache the data, But i faced one main problem for some time when hitting the url is not available or throw the respone for 404 or 500 the ehcache is cache next 20 mint show that 404 respone. how can i solved this cause. if there any idea let me know.

NOTE: 0 to 20 mint cache the data but incase first time hitting url the url respone for 404 means ehcache respone zero to 20mint 404 for in between the url response automatically solved and then response for 200 status but ehcache data show the 404 only. how to overcome the cause. how to check status then cache the url...

thanks
karthik
develop

neo

Joined: 04/15/2012 22:29:28
Messages: 5
Offline

Hello friends,
now i am using ehcache in my application but i have find out url web caching one issue for how to avoid 404 or 302, 500 errror url will not caching if there any idea let me know. how to i filter 404 url.

thanks
karthik
develop

neo

Joined: 04/15/2012 22:29:28
Messages: 5
Offline

Hello friends,
How to solved ehcache cache http status code issues. now i am using url based web caching
rajoshi

seraphim

Joined: 07/04/2011 04:36:10
Messages: 1491
Offline

Hi,

Can you please share details for your use case and configuration .

Rakesh Joshi
Senior Consultant
Terracotta.
develop

neo

Joined: 04/15/2012 22:29:28
Messages: 5
Offline

Hi rajoshi,

I am using url based web caching still now working fine but i have one issu actually our application caching every 20 min cached the data it's fine no problem but sometime firsttime hitting the url the response for 404 or 403,500 throw means that time caching the 404 message next 20 min same error message show that user. how can i overcome the issue

ehcache config the web.xml
--------------------------------------
<filter>
<filter-name>CachingFilter1</filter-name>
<filter-class>net.sf.ehcache.constructs.web.filter.SimplePageCachingFilter</filter-class>
<init-param>
<param-name>suppressStackTraces</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>cacheName</param-name>
<param-value>CachingFilter1</param-value>
</init-param>
</filter>


<filter-mapping>
<filter-name>CachingFilter1</filter-name>
<url-pattern>*.do</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>

this is ehcache.xml config
----------------------------------
<defaultCache maxElementsInMemory="1000"
eternal="false"
timeToIdleSeconds="1200"
timeToLiveSeconds="1200"
overflowToDisk="true"
maxElementsOnDisk="1000"
diskPersistent="true"
diskExpiryThreadIntervalSeconds="120"
memoryStoreEvictionPolicy="LRU"/>

<cache name="CachingFilter1"
maxElementsInMemory="1000"
eternal="false"
timeToIdleSeconds="1200"
timeToLiveSeconds="1200"
overflowToDisk="true"
maxElementsOnDisk="1000"
diskPersistent="true"
diskExpiryThreadIntervalSeconds="120"
memoryStoreEvictionPolicy="LRU">
</cache>

this is my mvc controller return the resonse :-
-----------------------------------------------------

public ModelAndView handleRequest(final HttpServletRequest httpServletRequest,final HttpServletResponse httpServletResponse) {
ModelAndView modelAndView = null;
try{
logger.debug("In sample controller");
modelAndView = new ModelAndView("jsonOutput", "json", isample.getPageDetails(urlToLookup));
} catch(final Exception e){
logger.error("Error in sample controller :- " +e);
modelAndView = new ModelAndView("home", "controllerMessage",e.toString());
}
httpServletResponse.setContentType("application/json");
return modelAndView;
}
if ther any idea plz let me know

Thanks
karthik
topswtor

neo

Joined: 05/09/2012 23:52:13
Messages: 1
Offline

Buy Cheapest WOW Gold within seconds.Here you can buy any WOW Items and WOW Gear which are tradeable.Buy WOW Gold now and you will be surprised with our Cheap WOW Gold and convenience service!Buy Cheapest WOW Gold with Instant Delivery is no more a dream!Buy WOW Gold For Sale from professional Gge store.Get Best WOW Gold fast delivery.Buy WOW Items and Cheap WOW Items now!Cheapest US WOW Items For Sale.Here you can find some resources about the best places to Buy WOW Gear or get it yourself Buy WOW Gear Online.Best WOW Gear Here!Our Fast WOW Gold Some discount now! We have reviews of top WOW Gold Site and comparisons so you can decide the best place to buy Gold For WOW.In the cutthroat Best WOW Gold Site.The cheapest SWTOR Credits provided and fastest SWTOR Gold delivery in 1-3 hours.Buy Star Wars Credits direct from the USA at low prices.you can buy Safe & Buy SWTOR Credits from us.Best Place To Buy SWTOR Credits.Buy Cheap SWTOR Credits,Order now! 24/7 online support,100% safe SWTOR Credits For Sale.SWTOR Credits Cheap for you.We provide you lowest prices but safe SWTOR Credits Asia Pacific delivery in 5-10 mins.Some SWTOR Credits Asia can help you.SWTOR Credits Buy direct from the USA at great prices.This article comes from the http://www.toponeswtor.com/.
 
Forum Index -> Ehcache
Go to:   
Powered by JForum 2.1.7 © JForum Team