postgres: implement database caching
postgres: implement database caching

tscholl2/smc,sagemathinc/smc,DrXyzzy/smc,sagemathinc/smc,DrXyzzy/smc,tscholl2/smc,DrXyzzy/smc,tscholl2/smc,sagemathinc/smc,tscholl2/smc,sagemathinc/smc,tscholl2/smc,DrXyzzy/smc