Yes, you should be able to allocate the new entry, initialize it, then add it to the cache (at which point it gets wrapped up in the shared_ptr).