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

Avoid storing duplicate language versions in the resources cache #4231

Closed
bep opened this Issue Jan 6, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@bep
Member

bep commented Jan 6, 2018

For site with 2 languages it may look like this:

resources
└── _gen
    └── images
        ├── 2017
        │   └── 12
        │       └── 28
        │           └── hugo-0.32-howto
        │               ├── sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q10_box_center.jpg
        │               ├── sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q75_box_center.jpg
        │               ├── sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_box_left.jpg
        │               ├── sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_box_right.jpg
        │               └── sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x90_fit_q75_box_center.jpg
        └── en
            └── 2017
                └── 12
                    └── 28
                        └── hugo-0.32-howto
                            ├── sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q10_box_center.jpg
                            ├── sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q75_box_center.jpg
                            ├── sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_box_left.jpg
                            ├── sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_box_right.jpg
                            └── sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x90_fit_q75_box_center.jpg

Which works, but is wasteful (both in space and time). We should be able to do better.

Reminder to self:

There are two cases here the regular + multihost.

@bep bep added the Enhancement label Jan 6, 2018

@bep bep added this to the v0.33 milestone Jan 6, 2018

@bep bep self-assigned this Jan 6, 2018

@bep bep modified the milestones: v0.33, v0.32.3 Jan 6, 2018

@bep bep added Bug and removed Enhancement labels Jan 6, 2018

@bep bep changed the title from Avoid storing duplicate versions in the resources cache to Avoid storing duplicate language versions in the resources cache Jan 7, 2018

bep added a commit to bep/hugo that referenced this issue Jan 7, 2018

@bep bep closed this in #4236 Jan 7, 2018

bep added a commit that referenced this issue Jan 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment