Chosen solution
Firefox should automatically trim the cache for you when it nears fullness. This wouldn't affect your cookies.
One possibility is that cookies are being cleared or expired out at certain intervals by an add-on or by external software.
Another possibility is that there is some kind of conflict or corruption with your cookies. You can delete all the cookies for a particular site (e.g., Google) using the Page Info dialog. While viewing a page on the site, try either:
- right-click and choose View Page Info > Security > "View Cookies"
- Alt+t (open the classic Tools menu) > Page Info > Security > "View Cookies"
In the dialog that opens, you can remove the site's cookies individually.
Hopefully after your next login any conflict or corruption will be resolved.