Re: Re: PHP script for viewing subversion repositories
Chuck Hagenbuch <[email protected]>
| Newsgroups | gmane.comp.horde.chora |
|---|---|
| Message-ID | <[email protected]> |
Quoting "Jay Freeman (saurik)" <[email protected]>: > Why exactly do you want to have to make it a seperate "set the repository" > call rather than just passing it to the object's constructor (which is how > the standard mode of operation would be were this C++ or Java)? The key > example I'm looking at is CVSLib_Directory. Eh, I was thinking it'd be cleaner for cases like CVSLib_File. I guess it's not that important, as long as it's encapsulated in the CVSLib/SVNLib calls (ie, passing $this from CVSLib::getFileObject() is fine; doing $foo = $VC->queryDir($VC, $where) is just silly. > And then there's CVSLib_File. Were the cache to work as "first construct an > object, then pass a key for the object along with a reference to that object > to some cache storage object" then the course of action would be easy: I > construct the object with a repository reference (without actually saving > the repository reference in the object) and then save the object to the > cache. After saving it I set it's repository reference and start to use it. > Later, when I want the object again, I use it's key to recover it from the > cache (or construct it using the previous algorithm if I can't find it and I > get back a null reference) and then set its repository pointer. However, the > cache system is doing something that I find just downright scary, hehe... it > works by taking a string argument which is some kind of code snippet that it > runs to construct the object? Isn't that largely redundant? The only usage I > could see for that is if someone later wants that object and it got purged > from the cache and it needs to get recreated automatically, but in that > scenario it wouldn't have any of the other objects it needs to reconstruct > it anyway, and seemingly the person calling the cache function has to pass > the construction code in again anyway, in which case they might as well just > not get back an object at all, create the object, and then donate it back to > the cache... Because our Cache system has a driver for the Zend performance suite, and that's how the ZPS API works. -chuck -- Charles Hagenbuch, <[email protected]> They're just looking at a wall of meat. -- Chora mailing list Frequently Asked Questions: http://horde.org/faq/ To unsubscribe, mail: [email protected]