Improved CachedRecord.setup (not using class eval anymore)