Moderator note. If you have found this forum thread from a google or other search, please be warned: there appears to be no logical reason why this should work. The method appears elsewhere, although it is impossible to tell where it started, and seems to have become some sort of internet version of a folk remedy for flash problems. Despite the claims that some in this thread have made that it has solved their flash problem, the forum staff urge caution in its use. Use at your own risk. It may have adverse effects on your system. In particular, be careful to add in the extra code properly otherwise you may break the functionality of the package and update managers.
So I've had the same problem as a lot of people, youtube was extremely laggy even when I played 240p videos and I tried everything, html5 youtube, flash-aid plugin for firefox and whatnot, and they didn't work for me.
Then I enabled "Override automatic cache management" on firefox. It got a little better but still a bit laggy on fullscreen.
Then I thought I'd let Ubuntu use more cache . So if you have the same problem just try this:
sudo gedit /etc/apt/apt.conf.d/70debconf.
Then put this code,:
on that file and then save it.
Next type this code on your terminal
sudo apt-get clean && sudo apt-get update --fix-missing
and you won’t find apt cache limit again in the next time.
It worked for me!!!