josegonzalez / cakephp-version

CakePHP3: plugin that facilitates versioned database entities
MIT License
51 stars 22 forks source link

Garbage collector #28

Open dereuromark opened 7 years ago

dereuromark commented 7 years ago

Would it be useful to have a simple "max versions per entity" config? E.g. "only store the last 10 versions per posts".

And making it simple for a project cronjob to weekly clean out older versions not needed anymore etc? Maybe providing a basic query or method in the behavior for this.

josegonzalez commented 7 years ago

That works. I don't think saving should trigger GC, but a cron thing could. Should default to infinite retention imo.