Yeah, my pet is stuck as showing 4/10, and when I pulled six things out to feed him, he only ate four of them. And is still showing 4/10.
Frustrating, and for me, personally, I'd have rather dealt with a few seconds of lag when loading the pet page (Then again, I am feeling really irritable today, so it's probably just me being annoyed with everything)
bird and bear and hare and fish give my love her fondest wish
It is on a 30-minute cache. I plan to add more complex logic to clear the cache when the hunger goes down and all, but that will have to wait. I think I can decrease the cache time for now, as it looks like the speed isn't as much of an issue now, so we don't have to cache things so long. Maybe down to 5 or 10 minutes :)
The pet rank was a huge part of it. But also it was the inefficient way we were pulling the rest of the data. Using sapi made all of our database queries more efficient.
🐝 ☕ bug (he/him) | your friendly neighborhood code wrangler. stay in the loop! join and check out the latest admin post highlights
Even 5 minutes seems like kind of a long time, considering it used to update right away and how much information there is on the page that can be changed really fast. I know it's to help the page load better, but I agree with it feels more inconvenient this way.
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
Okay, that makes sense the way you explained it now! I can be patient while the rest of the work is being done, thanks for the updates. <3
I just finished writing the stuff for pet treasure and resort status. Can you guys look and see if it's working now for you? :)
No problem! I will be working on the cache stuff tonight (now) so hopefully it won't be too long a wait.
🐝 ☕ bug (he/him) | your friendly neighborhood code wrangler. stay in the loop! join and check out the latest admin post highlights
Both the resort and the treasure are showing properly. I really like the changes but am looking forward to the stats updating in a better time.
The inn shows up and so do the TC spots and WOW at the speed. Very nice ^_^ Thank you so much! Edit: Okay Put a pet into the Resort as well. Once the cache caught up, it shows up nicely. The link to rank is awesome. :)
Holiday Clickables
| |
Thanks so much for a) being amazing and doing things and b ) listening to feedback and responding promptly
bird and bear and hare and fish give my love her fondest wish
Noticed that the pet page was working so much better~ Love it! Example: I only really care about the rank of 1~2 of my guys, so that link is just wonderful. No need to load up all of my pets' ranks every time! And, everyone on one page again? Delightful.
Great job as always, ! ❤️ :D
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
For the stat booster thing, is that only when using items or will it work when using EXP from battling as well? (here) I spent what I earned already today, so I can't test it myself.
And the showing the pet's new hunger when feeding is pretty nice too, thanks! :)
Oh Bug! That helps SO Much with my Foodie pet. Thank you for thinking of that! :)
Holiday Clickables
| |
Not EXP yet. I have a huge list of things to add this to, cuz there's a LOT of places that change your pet's info. So far I've only added the cache update on the things I listed above. I will keep adding it to things of course :) But right now I think I need a break from this haha.
No problem! The number was right there in the code so I thought why not? Maybe I'll add some cute things for your pet to say when you read books to them too at some point x)
🐝 ☕ bug (he/him) | your friendly neighborhood code wrangler. stay in the loop! join and check out the latest admin post highlights
- That sounds great. I would like to see that with the books and intel. But after everything else XD you got your hands full as it is. :)
Holiday Clickables
| |
No worries! I just wanted to clarify, thanks again for addressing these so quickly :)
- great stuff, it's all looking really good and loading super quick! Thank you! :D :D