I've brought this up since it certainly is very slow to load right now. We have some ideas for improving it, but it'll take some time since it may require a lot of work.
For now, if it has trouble loading for you the first time, try refreshing the page. It should be faster on the second load because the first load is when the data gets cached, but the second load can just load from the cache.
🐝 ☕ bug (he/him) | your friendly neighborhood code wrangler. stay in the loop! join and check out the latest admin post highlights
Hey everyone. I spent the past few days working on getting the pets page to load faster. In fact, it loads so fast now that Keith decided we don't need to paginate it anymore! Feeling proud. Go check it out! :)
🐝 ☕ bug (he/him) | your friendly neighborhood code wrangler. stay in the loop! join and check out the latest admin post highlights
Thank you for noticing those! There's so much stuff on that page. I think I overlooked those things! I will get to work to add them back asap!
🐝 ☕ bug (he/him) | your friendly neighborhood code wrangler. stay in the loop! join and check out the latest admin post highlights
I decreased it to 5 minutes for now. I hear you, but the solution is not to disable the cache. The solution is to clear the cache intelligently when things change. For instance, the code that handles feeding a pet should clear this cache, so that the hunger will always be up to date. When your pet gains a stat from training, that's another place that needs some code added to clear the pet's cache. Please be patient while I add this functionality, because there's dozens of places where this needs to be added.
The cache is there so that we don't need to peek in the database again if the information has not changed. When it's implemented correctly, it should act in the way you describe, with the page appearing always up-to-date. But that will take time for me to write, since the sapi (and its cache) lives on a different server from the user-facing Subeta website.
[edit] And by "time" I mean a few more hours! I still have to fix the thing with the TC and resort that I overlooked too.
🐝 ☕ bug (he/him) | your friendly neighborhood code wrangler. stay in the loop! join and check out the latest admin post highlights
I just finished writing the cache infrastructure for this, so now it's just down to remembering all the places I actually need to clear the cache.
So far, I've forced cache updates for these things:
Next up is when you change pet order, or change a pet's name, species, or color, cuz I figure those are pretty important changes to see immediately too! And also pet transfers and adopting/abandoning a pet. So... stay tuned. And until those are done, please give it 5 minutes after a change, as the cache is set to 5 minutes right now (hopefully a good compromise while I work on stuff).
Thanks for your patience as I continue to hook things up :)
[edit] Oh forgot to mention. While doing the hunger thing, I changed the message when you feed your pet to tell you what its new hunger is. Thought you'd appreciate that!
🐝 ☕ bug (he/him) | your friendly neighborhood code wrangler. stay in the loop! join and check out the latest admin post highlights
No. The only reason we had pagination in the first place was because otherwise the page took too long to load (or just didn't load at all). There are better (and more proper) ways to accomplish the functionality you describe, but that can be discussed in the future :)
I don't really know what you're referring to about the pet images. It's probably just cuz we're on a really terrible layout right now as far as responsiveness goes. But I didn't actually change the layout at all on the page, so I don't think it's relevant here.
[edit] Also I fixed that dropdown thing like a month ago hahaha, thank you for noticing XD
🐝 ☕ bug (he/him) | your friendly neighborhood code wrangler. stay in the loop! join and check out the latest admin post highlights
Yes, is correct. I switched a couple things to the new cache, but I'm leaving the rest for now because it isn't as simple as find-and-replace unfortunately, and I'm going to be rewriting a lot of this code soon. For now, I guess spread the word that things are on a 5-minute cache so just give it 5 minutes. (I'm sorry about the wait, but to be honest it's much better than 20 minutes or something...)
Thanks again for everyone's patience while I tackle Subeta's codebase. Lots of big changes, and I'm doing my best to roll them out somewhat smoothly and quickly :)
can lock this post, the main issues have been addressed and the remaining cache updates is on a to-do list for now.
🐝 ☕ bug (he/him) | your friendly neighborhood code wrangler. stay in the loop! join and check out the latest admin post highlights