Closed acrylian closed 1 year ago
Ok
Another thought since it is a depended plugin would be to make it really dependent, e.g. make the smartImageCache class a child class of the cache Manager class (smartImageCache extends cacheManager
) and just override the methods if possible.
In case we decide to take this into core at some later time that makes things easier (besides some code formattting etc. changes). But I have not exactly looked into compatibility of your methods.
Ok. I think it is still too primitive to think to integrate. I got in mind a lot of small and big improvement to make it faster and more robust. One for all, I am wondering if it could be better to browse images directly by db instead of by album's tree. This would permit not to browse the whole tree from the beginning on every chunk.
I think it is still too primitive to think to integrate.
This is for the future sometime anyway and we'll see if we will do or not. But it would be good to already follow coding styles we use so it might be easier then. Take a look here: https://www.zenphoto.org/news/developer-coding-guidelines/
One for all, I am wondering if it could be better to browse images directly by db instead of by album's tree.
No, because if you upload images and especially a lot at one go via FTP they might not be in the db yet. Also the db may not be the current state if you have removed images or albums via FTP directly meanwhile.
Zenphoto is primarily file system based. We do use the db in some occasions but if you want to be able to pre-generate the cahce you should use the file system to really discover them. As otherwise you will get the "on the fly" generation you want to avoid with this.
Ok
Another thought since it is a depended plugin would be to make it really dependent
It is a bit heavy in re-engineering, but I will consider it
It is a bit heavy in re-engineering, but I will consider it
Yeah, take a look. A child class can do it's own thing and add methods as needed, just overwritten ones must be compatible regarding parameters and such. But it is not a must at all. Your plugin after all!
We don't follow this ourselves in lots of plugins - we eventually will change that - and it is not exactly required. So just a recommendation to separate classes for the options and the actual plugin functionality. This might be useful to some future changes planned.