summaryrefslogtreecommitdiffstats
path: root/hugolib/pageCache_test.go
AgeCommit message (Collapse)Author
2017-02-17all: Refactor to nonglobal Viper, i18n etc.Bjørn Erik Pedersen
This is a final rewrite that removes all the global state in Hugo, which also enables the use if `t.Parallel` in tests. Updates #2701 Fixes #3016
2016-03-24hugolib: Some more GoLint fixesBjørn Erik Pedersen
2015-12-19Clean up the loop counter variables confusion in TestPageCacheBjørn Erik Pedersen
See #1601
2015-12-18Fix 2 data races in TestPageCacheBjørn Erik Pedersen
See #1601
2015-12-10Add copyright header to that source files that don’t have one.Anthony Fok
See #1646
2015-07-23Fix data races in sorting and ReverseBjørn Erik Pedersen
The custom sort functions used from the templates had some subtle data race- and related issues, especially when used in the single page template. This commit fixes this by making copies and protect the read and writes with a RWMutex. The results are cached (it will typically be invoked *number of pages* times with exactly the same data). This is, not surprisingly, also faster: ``` benchmark old ns/op new ns/op delta BenchmarkSortByWeightAndReverse 14228 491 -96.55% benchmark old allocs new allocs delta BenchmarkSortByWeightAndReverse 1 0 -100.00% benchmark old bytes new bytes delta BenchmarkSortByWeightAndReverse 32 0 -100.00% ``` Fixes #1293