On Thursday, August 17, 2017 at 11:47:37 PM UTC-4, Jun Omae wrote: > > On Fri, Aug 18, 2017 at 10:40 AM, RjOllos <[email protected]> wrote: > > > > On Thursday, August 17, 2017 at 3:38:40 PM UTC-4, Jun Omae wrote: > >> > >> Enabling [git] persistent_cache, it checks whether it needs to refresh > >> the cache when Repository.sync() is invoked via explicit > >> synchronization. If explicit synchronization is not set up, new > >> commits in the repository wouldn't be shown. > >> > >> Disabling [git] persistent_cache, it checks whether it needs to > >> refresh the cache each web request. That is `git show-ref` command is > >> invoked each web request. However, new commits in the repository would > >> be shown even if no explicit synchronization. > > > > > > We have a sync_per_request attribute that determines when the db cache > is > > synchronized. If you've setup explicit synchronization then I assume > you'd > > want persistent_cache = True and sync_per_request = False. If you > haven't > > setup explicit synchronization, you'd want persistent_cache = False and > > sync_per_request = True. > > > > Would it make sense to just remove the persistent_cache option and use > > sync_per_request to determine whether the Git revision cache is > > reconstructed on every web request? > > I consider that is not good. > > GitCachedRepository.sync() checks whether each revision of the > repository is cached in revision table to execute a SELECT query. That > would lead performance down if too many revisions. > > However, I think we could improve the sync() for already synchronized > cached git repository, to check each ref is cached before checking > whether all revisions are cached. I agree removing persistent_cache > option if improving sync() by the following patch. >
That would be good, because otherwise we should provide a better description of persistent_cache and guidance for when it should be enabled. Having fewer configuration options will make Trac easier to setup and configure. I created a ticket for your change: https://trac.edgewall.org/ticket/12895 - Ryan -- You received this message because you are subscribed to the Google Groups "Trac Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/trac-dev. For more options, visit https://groups.google.com/d/optout.
