syncthing/lib/ignore
Jakob Borg a2b8485a89 lib/ignore: Fast reload of unchanged ignores (fixes #3394)
This changes the "seen" map that we're anyway keeping around to track
the modtimes of loaded files instead. When doing a Load() we check that
1) the file we are loading is in the modtime set, and 2) that none of
the files in the modtime set have changed modtimes. If that's the case
we do a quick return without parsing anything or clearing the cache.

This required adding two one seconds sleeps in the tests to make sure
the modtimes were updated when we expect cache reloads, because I'm on a
crappy filesystem with one second timestamp granularity. That also
proves it works...

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3754
2016-11-22 21:30:45 +00:00
..
testdata mv internal lib 2015-08-09 09:35:26 +02:00
cache_test.go lib/ignores: Use bitmask for result 2016-05-01 15:58:23 +00:00
cache.go lib/ignore: Implement deletable ignores using (?d) prefix (fixes #1362) 2016-04-07 09:34:07 +00:00
ignore_test.go lib/ignore: Fast reload of unchanged ignores (fixes #3394) 2016-11-22 21:30:45 +00:00
ignore.go lib/ignore: Fast reload of unchanged ignores (fixes #3394) 2016-11-22 21:30:45 +00:00