About product images cache on version 4.0

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
Hello, I have a question to ask,
Our Project change to nop,so I create a scheduleTask to upload product images.
After upload product images from old db,it's works.but when i update images from old db , there no change.

Click" Clear cache " in admin is also not work,What's wrong?

  _cacheManager.RemoveByPattern(string.Format("Nop.pres.product.detailspictures-{0}-", product.Id));
        _cacheManager.RemoveByPattern(string.Format("Nop.pres.product.picture-{0}-", product.Id));
        _cacheManager.RemoveByPattern("Nop.pres.productattribute.picture");
        _cacheManager.RemoveByPattern("Nop.pres.cart.picture");
        var picture = _pictureService.GetPictureById(pic.PictureId);
        picture.PictureBinary = fileBinary;
        picture.IsNew = true;
        _pictureRepository.Update(picture);
5 years ago
xinghan wrote:
Hello, I have a question to ask,
Our Project change to nop,so I create a scheduleTask to upload product images.
After upload product images from old db,it's works.but when i update images from old db , there no change.

Click" Clear cache " in admin is also not work,What's wrong?

  _cacheManager.RemoveByPattern(string.Format("Nop.pres.product.detailspictures-{0}-", product.Id));
        _cacheManager.RemoveByPattern(string.Format("Nop.pres.product.picture-{0}-", product.Id));
        _cacheManager.RemoveByPattern("Nop.pres.productattribute.picture");
        _cacheManager.RemoveByPattern("Nop.pres.cart.picture");
        var picture = _pictureService.GetPictureById(pic.PictureId);
        picture.PictureBinary = fileBinary;
        picture.IsNew = true;
        _pictureRepository.Update(picture);


Browser cache may issue too, if others thing OK.
5 years ago
sohel wrote:
Hello, I have a question to ask,
Our Project change to nop,so I create a scheduleTask to upload product images.
After upload product images from old db,it's works.but when i update images from old db , there no change.

Click" Clear cache " in admin is also not work,What's wrong?

  _cacheManager.RemoveByPattern(string.Format("Nop.pres.product.detailspictures-{0}-", product.Id));
        _cacheManager.RemoveByPattern(string.Format("Nop.pres.product.picture-{0}-", product.Id));
        _cacheManager.RemoveByPattern("Nop.pres.productattribute.picture");
        _cacheManager.RemoveByPattern("Nop.pres.cart.picture");
        var picture = _pictureService.GetPictureById(pic.PictureId);
        picture.PictureBinary = fileBinary;
        picture.IsNew = true;
        _pictureRepository.Update(picture);


Browser cache may issue too, if others thing OK.

Clear Browser cache, it's still default images,

I change the setting "media.images.storeindb" to false,
Do you have any impact?
5 years ago
sohel wrote:
Hello, I have a question to ask,
Our Project change to nop,so I create a scheduleTask to upload product images.
After upload product images from old db,it's works.but when i update images from old db , there no change.

Click" Clear cache " in admin is also not work,What's wrong?

  _cacheManager.RemoveByPattern(string.Format("Nop.pres.product.detailspictures-{0}-", product.Id));
        _cacheManager.RemoveByPattern(string.Format("Nop.pres.product.picture-{0}-", product.Id));
        _cacheManager.RemoveByPattern("Nop.pres.productattribute.picture");
        _cacheManager.RemoveByPattern("Nop.pres.cart.picture");
        var picture = _pictureService.GetPictureById(pic.PictureId);
        picture.PictureBinary = fileBinary;
        picture.IsNew = true;
        _pictureRepository.Update(picture);


Browser cache may issue too, if others thing OK.

my english is not so good,
Clear Browser cache is not work,Have influence on that change the setting "media.images.storeindb" to false?
5 years ago
It's solved,thank you so much!
I must save in file, not only update binary.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.