The simpleCache is automatically loaded on every page so it's good for small data because it saves you a query. But if the data is large then you are talking memory footprint. If you don't need the data on every page then the extra memory footprint might not be worth it.
For data that is not needed on every page you might consider creating your own registry entry:
http://xenforo.com/community/thread...ll-users-over-several-runs.33600/#post-382901
Using your own registry entry adds one query when you access the data.
I didn't see this message, thanks Jake ! The way to use that registry record is as easy as to use the simplecache!
I've just have a few other questions:
- When you say "small data", how small is that? 200, 2000, 20000 characters? I think I've read in one post (may be yours) that the data were stored in db as 'mediumtext' (16777215 characters).
- So in theory if coders want to store datas they have to share that amount and can't go over?
- And just to check, is it the same with the registry solution?
明白! Perfectly clear. Thank you !Yes, all registry records are limited to 16M of data by the column type. An individual registry record can be up to 16M. The entire simpleCache (being its own record) can be up to 16M. Keep in mind that the simpleCache is shared by all addons so don't be a hog.
If you are loading 1M or more of data into the simpleCache then you need to start thinking about memory footprint. That's arbitrary though.
We use essential cookies to make this site work, and optional cookies to enhance your experience.