More cleanly modularized using livewire computed attributes. Abuses the fact that only one of the tabs is selected and most users won't access the other tabs. This significantly reduces the time spent loading the home page when the cache is cleared.
Use a 1-1 relation. Cache it indefinitely to reduce queries for every http request. This will make it much easier to add additional user settings for various site features without sacrificing clean code or performance.
By only showing the newest torrents by default, we can abuse the fact that it's the only tab we can easily put an index on to make the home page load fast, and keep the 4 other tabs that take ~1 second to query lazily loaded until clicked upon.
The index on the torrents table makes two 2-second queries negligible. The order by id desc makes one of the 2 second query negligible. The explicit select on the torrents table halves the time of the other 4 of the 5 queries.
Make sure the cache caches based on the group since the privacy setting for showing up here can be based on the group. Also show the data in columns to look a little nicer.
We only cache it if it exists, so let's not query it every single time it doesn't exist.
We don't remove it from the hourly run command yet so that currently existing freeleeches can be deleted.
- github action updated with new ruleset in pint.json
- codebase linted with new ruleset
- contributors can now run `./vendor/bin/pint`
- action workflow will auto correct any lint issues upon commit/opened pull request
- Change simple property init and assign to constructor promotion
- Remove unused variable in catch()
- Change docs types to union types, where possible