anatoly techtonik wrote: > The strange thing that in spite of CacheManager isolated in separate > ComponentManager, the extension point is registered correctly and > plugin is also called when needed. If I understand it right - > implementing plugins should be registered by the Environment in the > Environment. But how does it happen that they are registered as > isolated CacheManager observers?
I suppose it is because you store the CacheManager instance in CachedRepository.cache_mgr, and use that attribute to call its methods. > I see that my messages in trac.log are duplicated even without > mod_python with FastCGI. Does that mean they are using some lock > mechanism to access shared resources? I have never seed log messages duplicated, so I cannot help there. But logging in Trac uses the logging module from the Python stdlib, which provides adequate locking. > Should plugins be aware and use > some API to do the same? No, you shouldn't have to worry about that. > I am using MySQL, but it would probably > create problems with SQLite if I decide to make my own database in > trac environment directory for whatever reason I have. Is it right? You should probably not create a separate database, just create one or more tables in the current Trac database. > No-no-no. The whole thing is very interesting and it is not described > anywhere. Ah, yes, I didn't mean that it is forbidden to look into the plumbing. Curiosity is very good, and it is always interesting to know how things work underneath. But I assumed that your immediate goal was to get your plugin working, and for that, you shouldn't worry about the plumbing. It *is* described somewhere: in the code ;-) But I admit that, while being very elegant, the implementation uses quite a lot of Python magic. Definitely not for the faint of the heart. -- Remy
signature.asc
Description: OpenPGP digital signature
