Added memcache functionality to main page (regular and
JSON) and to the permalink page (regular and JSON).
 Added a page to flush the memcache.