When caching is enabled, ContentService caches objects of different types under the same key. This means that once an object is cached, any further calls for the same ID that use a different type will always return null.
This means that using GenericContent objects is impossible with caching enabled. As soon as the list in the manager retrieves a list of ContentInfo objects, all your calls to retrieve the full objects start to fail (and vice versa).
// Get an instance of MyContent
var content = await api.Content.GetByIdAsync<MyContent>(ID);
// This call will now return null until cache is cleared
var contentInfo = await api.Content.GetByIdAsync<ContentInfo>(ID);
Hi,
When caching is enabled, ContentService caches objects of different types under the same key. This means that once an object is cached, any further calls for the same ID that use a different type will always return null.
This means that using GenericContent objects is impossible with caching enabled. As soon as the list in the manager retrieves a list of ContentInfo objects, all your calls to retrieve the full objects start to fail (and vice versa).