Resource class memoization.