On Tue, 2 Mar 2010 16:59:03 +0000, Gavin Panella <[email protected]> wrote: > There was another similar problem recently, but I can't recall the details.
task_age being exported on bug_task, which I fixed :-) This one was worse as it changed every second (it was a @property that calcuated derived data), which meant you couldn't take more than a second to GET a bug_task and PATCH it, quite difficult with most people's RTTs. > I agree that making it a method would be the quickest fix, but it > feels more natural as an attribute. That's true. > A way to mark attributes as volatile - and thus not included in etag > calculations - could be one solution (i.e. an export decorator). I > guess this would need support in lazr.restfulclient though. That would > open the door to exporting other aggregate or derived model properties > as attributes, though that might not always be a good idea. I don't think it needs support in lazr.restfulclient, etags are opaque strings to the client, it just remembers what the server told it last. Leonard could confirm whether only using writeable attributes when deciding whether to change the etag would be a good idea. The only issue with doing it is that a 412 may be the correct thing to do in certain circumstances, but I think they would be rare. Thanks, James _______________________________________________ Mailing list: https://launchpad.net/~launchpad-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~launchpad-dev More help : https://help.launchpad.net/ListHelp

