Hi, Richard Levitte wrote:
The cache will die with the path object anyway.
I think that's the part where confusion comes from. I was talking about a cache outside of the path object, as the path object is const. So your above assumption would not be true - the cache would not die with the path object. That would certainly lead to a needlessly complex caching logic within monotone.
markus> That, and for the sake of simplicity, I'd rather like to bind markus> the cached status to the lifetime of the any_path object. Good, I like that we agree on this.
The problem is: to do that, we either need to make all any_path objects writable (i.e. remove const), or work around that somehow. What I'm currently trying is having the constructor and destructors add and remove a cache value for the path object in question.
Another idea would be, to simply override the const with a const_cast<> and write to the path object even if it's declared const... But such hacks always feel dirty.
Better ideas? Regards Markus _______________________________________________ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel