On 5/17/2011 10:48 AM, Jeremy Dunck wrote:
On Tue, May 17, 2011 at 9:16 AM, Jonas H.<[email protected]>  wrote:
....
Invalidation is what I'm unsure about too -- multiple ideas came to my mind,
all involving some sort of Great Hash(tm):
Even within a single test command run, the same DB setup and same
fixture loads are done many times (for a sizable suite).  Invalidating
too often is better than invalidating too little.

1) Use file modification timestamps for all model and test related files.
Advantages: simple, works.
Disadvantages: Triggers cache invalidation for changes not related to models
or tests
I think this is a pretty big win, even though it's not theoretically optimal.

Maybe it wouldn't be so bad to punt on invalidation? The cached databases would only have to be rebuilt if the models changed or if the fixtures changed, right? We have a similar situation now with migrations: you have to write one every time you change a model, and there's no automatic mechanism that kicks in to tell you to write one, you just have to know: "change a model, write a migration." If that's working now, then what's wrong with, "change a model or a fixture, re-run the test database cacher."

--Ned.

--
You received this message because you are subscribed to the Google Groups "Django 
developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to