Allow caching objects directly.