To free pagecache:
- echo 1 > /proc/sys/vm/drop_caches
- echo 2 > /proc/sys/vm/drop_caches
- echo 3 > /proc/sys/vm/drop_caches
This tunable was added in 2.6.16.
Buffer & Cache
A buffer is a place you store data you've just acquired through some slow method (such as downloading from the Internet) so you have a store to work on in real time.
e.g. When you watch a streaming video, you start downloading the video from the remote server, store it locally, and when you have some of the data (how much varies, it could be a couple of seconds worth, it could be minutes or more), you then start to play it. This avoids stuttering if the connection slows slightly for a moment.
A cache is a similar concept. You get some data that you plan to access more than once, and save a copy somewhere that is faster then getting it from the original place again. e.g. Someone might search for "Hello" on Yahoo, so Yahoo will go through some databases and find matches to give back to the user. They might then cache the results, so if someone else searches for the same thing, they can get them quickly from the cache instead of trawling through all the big databases again.
They aren't UNIX specific concepts, and how you implement them depends on what you want to buffer or cache and where.