On Friday, March 18, 2022 at 10:41:47 AM UTC-7 galens wrote:
> Hi, > > I have some questions about git repositories. < > https://trac.edgewall.org/wiki/TracRepositoryAdmin#Repositorycaching> > indicates that a git repository is cached by default. However, if I add a > git repository to a new trac environment, when I do a resync I get a "0 > revisions cached." message. I assume this means that caching, at least for > git, does in fact default to false. Is this correct? > That statement is incorrect. I've edited the page accordingly. Good find! https://trac.edgewall.org/wiki/TracRepositoryAdmin?action=diff&version=53 The default config values are shown here: https://trac.edgewall.org/wiki/TracIni#git-section > If git repositories do indeed default to cached=false, under what > circumstances should I consider enabling caching? > It's more work to set up caching, but the performance will be better. So definitely if you will have concurrent access to the website and need reasonable performance. Setup a post-receive hook otherwise Trac will "sync on request", which can slow the page load time. https://trac.edgewall.org/wiki/TracRepositoryAdmin#Git The reason is that the synchronization is not done asynchronous with the page processing, although I suppose that would be easier to do with the new async functionality in Python3: https://trac.edgewall.org/wiki/TracRepositoryAdmin#PerRequestSync There are two caching options that work together. There should probably be only one, but it's an artifact of early development of the plugin. I doubt there is a use-case in which you would not enable the persistent_cache if you've done the work to setup the repository hooks, [git] cached_repository = enabled persistent_cache = enabled > Is there some way to view the entire trac configuration (not just the > trac.ini file)? > The /about page will show you the Trac configuration if you have CONFIG_VIEW (or TRAC_ADMIN). > I noticed that there doesn't see to be a trac-admin repository get > command. How can the cached state be queried? > $ trac-admin $ENV config get git cached_repository disabled Ryan -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/40851fad-0e57-4a50-ad49-444cda3ac287n%40googlegroups.com.