There is an option in about:config (Firefox 4):
I have tried to enable and disable this option, nothing changes. The cache just grows, and grows.
What's the point?
(Couldn't find any detail about this.)
It sets the disk cache size according to the available disk space. If you have a fairly modern computer, there should be at least 1GB available.
Where I can find the contents of local storage saved in Firefox? I have searched into the profile and appdata folder, but I couldn't find any reference to local storage.
Also, is there any way I can clean the browser cache but keep local storage saved data and/or pinned tabs?
Type into the address bar: about:cache.
See this page on the Mozilla MDN docs.