put all of this stuff into libsocialcache