Saving media with MediaService does not update caches
Hi! I'm experiencing some problems with media-cache not being updated after i programatically save (MediaService) a media-item. Any pointers on how to invalidate/refresh the media-cache?
The item (More specifically, a folder) has its "new" name in the backend, but in the front-end, it does not.
The second I click "Save" in the backend on the item I am trying to update, the front-end displays the right name.
I've tried the following things: Rebuilding both the Internal/External Examine Indexes, Rebuilding the "XML structure" (ApplicationContext.Current.Services.MediaService.RebuildXmlStructures()).
I'm guessing there is some sort of cache that I invalidate when clicking "Save and Publish" on the media-page in the backoffice, that apparently does NOT get updated/invalidated when I programatically update media.
I am having the same problem :
Backend sees the change, frontend ( TypedMedia ) dont
Umbraco version 7.14.0
var _mediaService = ApplicationContext.Current.Services.MediaService;
IMedia media = _mediaService.GetById(model.Id);
var newOwner = _memberService.GetById(model.Owner);
media.SetValue("owner", newOwner.GetUdi().ToString());
_mediaService.Save(media);
If i wait ~2 min I can see the new value in frontend ?
Saving media with MediaService does not update caches
Hi! I'm experiencing some problems with media-cache not being updated after i programatically save (MediaService) a media-item. Any pointers on how to invalidate/refresh the media-cache?
The item (More specifically, a folder) has its "new" name in the backend, but in the front-end, it does not.
The second I click "Save" in the backend on the item I am trying to update, the front-end displays the right name.
I've tried the following things: Rebuilding both the Internal/External Examine Indexes, Rebuilding the "XML structure" (ApplicationContext.Current.Services.MediaService.RebuildXmlStructures()).
I'm guessing there is some sort of cache that I invalidate when clicking "Save and Publish" on the media-page in the backoffice, that apparently does NOT get updated/invalidated when I programatically update media.
Did you find a solution to this ?
I am having the same problem : Backend sees the change, frontend ( TypedMedia ) dont
Umbraco version 7.14.0
If i wait ~2 min I can see the new value in frontend ?
The InternalIndexer had deletions and where not optimized.
After i Rebuild index on InternalIndexer in the Developer/Examine Management menu, the changes appear instant.
is working on a reply...