hunterhawley
3 weeks ago
143
3
Tips

Best Storage Method

Posted 3 weeks ago by hunterhawley

Hey y'all,

Quick question here: I'm working on the proposed solution to the following question (https://laracasts.com/discuss/channels/laravel/i-dropped-my-query-count-by-29980-but-page-still-takes-30-seconds-to-load) but could use a little guidance.

In this case, I am trying to cache a bunch of calculated basketball stats (Assists, Shooting percentage, etc.). For simplicity sake, assume we are just caching season-wide stats (I'll do other calculations but they will follow this same procedure).

Which storage type should I use for this? I basically need a table like this (https://ibb.co/M7cZ2vt) to be re-creatable from whatever I do. I don't really want to do JSON (personal preference) but if there is a case for why that is best, I'm up for it.

Should I maybe store as an array? Let me know what you think.

Please sign in or create an account to participate in this conversation.