Announcement

#46 2014-05-07 13:50:20

rvelices
Former Piwigo Team
2005-12-29
1960

Re: Huge amounts of queries to MySQL

Let me write the mechanism.  For the cache key we could use
Hash of user [nb_total_images] (obviously not page [items] which we don't have) and $forbidden. Its very unlikely to have a collision.
Anyway changing the key is easy

I have in mind a persistent cache object with a default implementation of files as a backend. One day someone can write a memcached version ...

Offline

 

#47 2014-05-07 14:25:17

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: Huge amounts of queries to MySQL

rvelices wrote:

Let me write the mechanism.

OK, please keep it simple and commented :-) (maintenance on the long run)

Offline

 

#48 2014-05-12 10:19:00

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: Huge amounts of queries to MySQL

I've seen and read [Subversion] r28432. It looks nice.

I was wondering if invalidate_user_cache() would reset cache. I see that the answer is "no", but I also see that the cache key uses the $user['cache_update_time'] (which is indirectly updated by invalidate_user_cache()) and in parallel there is a system of automatic purge. Very good I think!

This cache system is a nice improvement for big galleries. With it, I think we can safely keep the canonical_url as it is by default. Maybe we could have configuration parameter to say if the canonical url should use the "default" album or not. (how do we define the "default" album, I don't know, smallest category_id ?)

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact