Add middleware to cache a few instances manually.