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.
Il y a 5 ans
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);
Il y a 5 ans
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.
Il y a 5 ans
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?
Il y a 5 ans
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?
Il y a 5 ans
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.