Does v1.6 cache images?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 лет назад
Hi guys, Im currently building up my own site based off the Nop 1.60 source code.  From what I can tell this version doesnt cache picture objects, this is based off the fact that the GetPictureByID makes no reference to caching...

        public static Picture GetPictureById(int pictureId)
        {
            if (pictureId == 0)
                return null;

            var dbItem = DBProviderManager<DBPictureProvider>.Provider.GetPictureById(pictureId);
            if(!StoreInDB && dbItem != null)
            {
                dbItem.PictureBinary = LoadPictureFromFile(pictureId, dbItem.Extension);
            }
            var picture = DBMapping(dbItem);
            return picture;
        }

I've built my picture object to contain a URL rather than a binary of the image and am planning to cache my picture objects, any reason not to?

Thanks in advance

Sam : )
13 лет назад
The picture object does not get cached, but it also does not contain the binary data.

The binary data is only requested if the image does not exist already on disk.

HTH
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.