Add statemen caching mixin for databases.