We have always avoided caching null values since they usually arise due to errors. But, in the course of optimizing the work of caching in memory, we missed this point for the GetAsync method in the signature
Task<T> GetAsync<T>(CacheKey key, Func<Task<T>> acquire)
moreover, this method is in the signature
Task<T> GetAsync<T>(CacheKey key, Func<T> acquire)
provided that acquire returns the null, it will generally cause a NullReferenceException, which is not at all predictable
nopCommerce version: 4.70
We have always avoided caching null values since they usually arise due to errors. But, in the course of optimizing the work of caching in memory, we missed this point for the GetAsync method in the signature
Task<T> GetAsync<T>(CacheKey key, Func<Task<T>> acquire)
moreover, this method is in the signatureTask<T> GetAsync<T>(CacheKey key, Func<T> acquire)
provided that acquire returns the null, it will generally cause a NullReferenceException, which is not at all predictableexample: https://www.nopcommerce.com/en/boards/topic/99319/issue-with-product-pagination-and-price-display-in-nopcommerce-470