What is the difference Between Cache and Session | Cache Vs Session in PHP
In a recent project I had to use Session and Cache Both. But I wasn't aware of what's the major difference in Session as well as Cache. Because in that time I used to think as if both are storing some data which we can use further use. Actually the concept is same. But There is some Major differences as well. So Let's see what's that:
Cache can expire after a specific time means we can put some specific amount of time with cache whereas one an Item put into session can stay there forever until the session ends.
Cache is per Application based whereas Session is per User based means session data will be different for the various users for all the various users.
So these are the main difference between Cache an Session. There are other differences is there which will covered soon with example. So till then wait and stay connected with my Blog.
Thank you!
0 comments:
Post a Comment