Adds simple caching logic to Rails models