add tmp function for apc caching to db