[Yanel-dev] Limiting the number of revisions

Guillaume Déflache guillaume.deflache at wyona.com
Thu Jun 18 10:01:53 CEST 2009


Michael Wechner schrieb:
> Hi

Hi!


> There are sometimes content nodes which change a lot and hence produce a 
> lot of revisions and even if disk space is cheap it's not always 
> necessary to keep all revisions. This is often true for binary files and 
> often it's sufficient to have the last 10 revisions or so
> or only revisions newer than 7 days or a combination of it.
> 
> Hence I would like to introduce an optional parameter(s) such that one 
> can limit the number of revisions, whereas

I'd prefer than we inroduce a strategy class (RevisionDeletionStrategy?) 
instead of many integer parameters, as there are many policies one may 
want to choose, the default strategy being to never remove any revision 
of course. Then without enough context one can decide what to do with 
old revisions, binary or not (maybe only deleting some subset of the 
binaries may be enough).

Also I wonder how Yanel itself would react to missing revisions only for 
some files? That probably always needs application-level handling but I 
hope Yanel itself is already somewhat forgiving of such hiccups ATM.


> I would like to introduce this for the Yarep virtual file system 
> implementation and if it proves useful and solid, then maybe we can
> also  enhance the Yarep API.

..then we could reference this class from the Yanel API.


However before making changes to Yarep, I'd suggest we 1st try to fix 
the tests and run it under Hudson! ;)

Also if we have to change the API we should begin versioning it.
And if we do that it might be a good idea to try to "partition the API 
by capabilities" (Searchable? Versionable?) like it is done for the 
resource-type API.


Cheers,
    Guillaume


More information about the Yanel-development mailing list