I have problems with my images when they are published for more than 24 hours.
When I select an image with the media picker and want to show it on the page it works.
BUT after 24 hours the property returns null...
The only solution I found to fix it is by "rebuild the database cache" and reload the in-memory and local file cache in the settings section. But I can't do this everyday of course.
I don't think my code is wrong because everything works after I rebuild the cache. But below you see my code anyway.
If something is unclear please let me know!
@foreach (Sport sub in subMenuItems)
{
var image = sub.MainPhoto == null ? "https://via.placeholder.com/150x100" : sub.MainPhoto.Url;
<img src="@image" alt="">
}
If you have a development box that you can set up like your production box, you might see if upgrading to version 8.0.2 fixes it.
We were having an issue with some files that appeared almost exactly as you described, except we only had to reload the in-memory cache when the application pool recycled. By the time we verified what was happening, someone else had upgraded Umbraco and the problem mysteriously vanished.
Cache problems with images
Hi
I have problems with my images when they are published for more than 24 hours.
When I select an image with the media picker and want to show it on the page it works.
BUT after 24 hours the property returns null...
The only solution I found to fix it is by "rebuild the database cache" and reload the in-memory and local file cache in the settings section. But I can't do this everyday of course.
I don't think my code is wrong because everything works after I rebuild the cache. But below you see my code anyway.
If something is unclear please let me know!
What version of Umbraco? How often does your application pool recycle?
It’s umbraco 8.0.1
When I recycle the application pool nothing changes.
If you have a development box that you can set up like your production box, you might see if upgrading to version 8.0.2 fixes it.
We were having an issue with some files that appeared almost exactly as you described, except we only had to reload the in-memory cache when the application pool recycled. By the time we verified what was happening, someone else had upgraded Umbraco and the problem mysteriously vanished.
is working on a reply...