0

Hi I have implemented cache in my system through custom logic which checks for cache expiry and then make a decision that it needs to get the data from cache or from db or files.

In local enviornment it is working fine but on server enviornment it always gets the data from db or files instead of cache

Server enviornment has a app pool associated with my app and contains 8 process workers and because of 8 worker process each process has its own cache it is fine but for example if Pid 1234 reads first time from Db then second time the same process ID should read from cache untill it expires but again it was reading from db although all the settings are fine and idle timeout for pool is also 0 and system has enough memory and resources as well. Any idea that why it was behaving like that?

  • 1
    Based on the info you provided it seems like it could take up to 8 tries before you hit the process that has cached something. Are you sure it doesn't work at all? – Crowcoder Jul 08 '22 at 12:12
  • Yea I am sure that it doesn't work at all I tried almost 100+ times in order to see that if something is cached but every time it hits db instead of cache – Asad Sultan Jul 08 '22 at 12:33
  • I know you said it works locally but you could still have a flaw in your implementation. Are you aware there is cache capability built into the framework that you could use? – Crowcoder Jul 08 '22 at 12:34
  • Yup you are right about that and I know the capabilities present in framework but unfortunetaly I can not change the implementation untill I found the real cause and I also did the same pool setting to my local and still it was working correctly – Asad Sultan Jul 08 '22 at 12:41

0 Answers0