"Memory" and "temporary files" are different things.
Memory is normally RAM. Linux manages its RAM automatically, no cleaning needed; if there is some process misbehaving and using too much RAM, you just stop it. Browsers are classical offenders there; I need to close mine (and restart) every couple of weeks. Gnome-shell is another well-known memory leaker.
For the file part, you can install Ubuntu Tweak and use the janitor module:

See also How safe is Ubuntu tweak's Janitor?. You can also install it using a PPA, look here in WebUpd8 (it's still ok for 14.04).
Consider anyway that if you clear a cache, the data will need to be reloaded/rebuilt, so the effect is, most of the time, to slow things down(1). For example, clearing the nautilus thumbnails means they are to be rebuilt again --- slowing down file browsing.
(1) the only exception here is the apt-cache and the old kernels --- in normal condition, on desktop, they are almost always just lost space.
If your system is really slowing down a "rogue" or leaking application is the most common reason. Try to catch it with top
or similar tools, and if you find it, post a more specific question or a bug report.