how to Cache whole page
-
i have control which takes tto much time to load so i want to put tht page into cache. but accordint to different userid my first page is user login,after login user will get same page but diffent data . so i want to put tht page in to cache, how i will do tht?? put same page in cache but according to diiferent loginid
-
i have control which takes tto much time to load so i want to put tht page into cache. but accordint to different userid my first page is user login,after login user will get same page but diffent data . so i want to put tht page in to cache, how i will do tht?? put same page in cache but according to diiferent loginid
Keep it in the
Cache
object with user id as key and reload from there for subsequent requests.Navaneeth How to use google | Ask smart questions
-
Keep it in the
Cache
object with user id as key and reload from there for subsequent requests.Navaneeth How to use google | Ask smart questions
-
You said you have a control which takes time to load. So put only the items required to fill that control in cache and not the whole page. Follow these steps 1 - Check cache has data 2 - If not, get the data from database (or somewhere), fill the cache and populate your control 2 - If cache has data, get the data from cache and populate control. Check this[^] article and read about Cache arbitrary objects in server memory If your data load is fast and your control is taking time to render the data, you can keep the rendered HTML of that control in cache and reuse it.
Navaneeth How to use google | Ask smart questions
-
You said you have a control which takes time to load. So put only the items required to fill that control in cache and not the whole page. Follow these steps 1 - Check cache has data 2 - If not, get the data from database (or somewhere), fill the cache and populate your control 2 - If cache has data, get the data from cache and populate control. Check this[^] article and read about Cache arbitrary objects in server memory If your data load is fast and your control is taking time to render the data, you can keep the rendered HTML of that control in cache and reuse it.
Navaneeth How to use google | Ask smart questions