Thanks for your quick reply.
Let me just make sure I get this right before posting a ticket. No need to post one if what I'm asking is stupid.
"protected pages would be cached in their unprotected state" :
but if the cache is used AFTER checking the rights, it should not be a problem, right ?
" Also the cache otherwise needs to be cleared manually whenever a user changes something, otherwise he would not see his own changes."
But this does not sound related to the fact that the image is password protected, am I right ?
Or maybe I don't have the right meaning for "protected" ?
My problem is the following : to make a password protected gallery fast. It's protected just with a password. So in my mind, it should be possible to make sure the cache is used ONLY after checking the access rights. I made a small change in the static cache PHP file to do that on my gallery, and it seems to work. I say "seems" because I'm only considering my own case (simple password protection) and it's surely more complicated (I think it's possible to have identified accounts accessing a gallery maybe). I can document myself a bit more and propose a modification of the cache library if you want. I'm not a top notch PHP developper, but if I can help, I will try.
Then about the problem with modification, usually I clear the cache when I modify something in a gallery. The best solution could be to automatically clear it after a modification is made (on a per photo basis ideally, or on the full sub gallery otherwise). But I think it's another topic not related to my current problem.