Skip to content

WIP: DiffFile cache html rendered content

Paco Guzman requested to merge diff-file-cache-html-content into master

What does this MR do?

Just cache on Redis all the diff_file HTML content that we show on the browser under safe conditions to avoid complex cache keys and cache invalidation logic. Just if we render the lines and won't be any discussion already on that content.

I've opened this to test it and get some feedback about caching this HTML content which doesn't change never. Maybe instead on storing on Redis we can store it on ES just as an idea.

This won't speed up the first load, and will introduce some degradation depending on the number of files we render in the file. I didn't implement any optimization to retrieve multiple keys at once.

Are there points in the code the reviewer needs to double check?

Why was this MR needed?

What are the relevant issue numbers?

Screenshots (if relevant)

I've applied the changes in the code for some time and we get the following:

Screen_Shot_2016-08-25_at_10.57.48

Screen_Shot_2016-08-25_at_10.58.43

In the case of MR, as we already had the highlighted content cache, I guess rendering it inside some HTML is not so much resource expensive.

Does this MR meet the acceptance criteria?

Merge request reports