DevLog 8: Better Caching, Site Customization, Non-User Themes, and Feeds
Published on:
Caching
The user endpoints were lacking cache, it was deliberate because I wanted to avoid filling up my serverβs memory. But now that I have optimized most of the queries, most of the caching is re-used, and I believe it is optimized enough to not take up too much space.
Now user profile, status, and posts are all cached. And are cleaned up on update or after a small timeout.
Site Customization
Now you can disable user registration! Something that was bothering me a lot was that all users registering directly to Ownet were bots. It makes sense, since I have not announced Ownet to the public yet. Now, the site admin can disable the registration. It also disables users with IndieAuth from registering unless they already have an account.
Another customization is a site-wide toggle to disable JavaScript. I tested all site functionality without JavaScript to ensure that it works with and without JavaScript in all scenarios. So I have added a toggle.
Non-User themes
The themes can now be set by users not logged in. It uses cookies to set the theme instead of storing it in the database. This way, everyone will have a good experience.
Feeds
We finally support both Atom and JSON feeds! I wanted to do this from the very beginning, and it was very easy to implement anyway. So you can now follow these devlogs from your feed π.
Misc
All other changes were some minor refactors and fixes. While they are behind the scenes updates, they improved the code quality a lot by using modularization of the codebase. I also added a bunch of test cases that I found were missing.
Interactions
No interactions yet.