Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add caching to GetPage #3503

Closed
bep opened this issue May 22, 2017 · 1 comment · Fixed by #3504
Closed

Add caching to GetPage #3503

bep opened this issue May 22, 2017 · 1 comment · Fixed by #3504
Assignees
Milestone

Comments

@bep
Copy link
Member

bep commented May 22, 2017

See https://discuss.gohugo.io/t/setting-a-value-based-on-either-default-global-section-page-params/6671

@bep bep added this to the v0.22 milestone May 22, 2017
@bep bep self-assigned this May 22, 2017
@bep bep mentioned this issue May 22, 2017
bep added a commit to bep/hugo that referenced this issue May 23, 2017
When we know to look into the index pages collection, do that:

```
benchmark              old ns/op     new ns/op     delta
BenchmarkGetPage-4     51483         7072          -86.26%

benchmark              old allocs     new allocs     delta
BenchmarkGetPage-4     71             71             +0.00%

benchmark              old bytes     new bytes     delta
BenchmarkGetPage-4     2648          2648          +0.00%
```

This commit also returns an error if .Site.GetPage is called with the regular Page Kind, as that is currently not supported.

Fixes gohugoio#3503
@bep bep closed this as completed in #3504 May 23, 2017
bep added a commit that referenced this issue May 23, 2017
When we know to look into the index pages collection, do that:

```
benchmark              old ns/op     new ns/op     delta
BenchmarkGetPage-4     51483         7072          -86.26%

benchmark              old allocs     new allocs     delta
BenchmarkGetPage-4     71             71             +0.00%

benchmark              old bytes     new bytes     delta
BenchmarkGetPage-4     2648          2648          +0.00%
```

This commit also returns an error if .Site.GetPage is called with the regular Page Kind, as that is currently not supported.

Fixes #3503
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant