asp.net - Is there any way to clear cache from server farm? -


i have implemented outputcache in application , works fine, since have specified location server, , applications runs in server farm (2 servers) , when clear cache, clears 1 server @ 1 time. have thought specifying server location (hardcode), cache stored @ 1 place , can cleared when have to. so, there way hardcode server name location attribute in outputcache? or webconfig file?

declaration in webconfig

<system.web> <caching>   <outputcachesettings>     <outputcacheprofiles>       <add name="cache10minutes"            duration="300"            location="server"            varybyparam="none"/>     </outputcacheprofiles>   </outputcachesettings> </caching> 

definition in related page (page header)

<%@ outputcache cacheprofile="cache10minutes" duration="300" location="server" varybyparam="none"%> 

to clear cache on button click

httpruntime.unloadappdomain() 

or creating trigger database on update client. can clear cache both servers? correct me if idea wrong or not clear enough, i'm confused. please advice.

as far know output cache per server only. can implement own outputcacheprovider , implement own caching mechanism: outputcacheprovider class, msdn

outputcacheprovider redis

or maybe use distributed cache appfabric: how to: configure appfabric output cache provider asp.net . aware though microsoft ending support appfabric windows server next year microsoft appfabric 1.1 windows server ends support 4/2/2016


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -