Skip to content

Using weak tag instead of just last modification date #2435

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

Merged
merged 5 commits into from
Oct 23, 2018

Conversation

tulinkry
Copy link
Contributor

@tulinkry tulinkry commented Oct 22, 2018

This enables us to reflect all other factors
which contribute to the resource freshness

  • the last file timestamp
  • messages on the project
  • the timestamp of last index
  • the opengrok version
    We assemble all these to the weak tag,
    and the resource is reloaded only in any of these change

OpenGrok version is added to the weak tag attributes because of utils.js. Until now event when we increase the version of utils.js, the cached xref still pointed to the old version causing some drama with javascript. This way with every new OpenGrok version, each xref will be reloaded (no need for ctrl+shift+R).

fixes #2405

 - This enables us to reflect all other factors
   which contribute to the resource freshness
      the last file timestamp
      messages on the project
      the timestamp of last index
      the opengrok version
 - We assemble all these to the weak tag,
   and the resource is reloaded only in any of these change
@coveralls
Copy link

coveralls commented Oct 22, 2018

Pull Request Test Coverage Report for Build 3305

  • 0 of 19 (0.0%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.03%) to 73.473%

Changes Missing Coverage Covered Lines Changed/Added Lines %
opengrok-indexer/src/main/java/org/opengrok/indexer/web/PageConfig.java 0 19 0.0%
Files with Coverage Reduction New Missed Lines %
opengrok-indexer/src/main/java/org/opengrok/indexer/history/HistoryGuru.java 2 66.3%
Totals Coverage Status
Change from base Build 3293: -0.03%
Covered Lines: 32007
Relevant Lines: 43563

💛 - Coveralls

@@ -56,11 +56,8 @@
<filter-mapping>
<filter-name>ExpiresHalfHourFilter</filter-name>
<url-pattern>/history/*</url-pattern>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not history ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

history does not include mast.jsp so this does not affect it anyway

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that history page will not display any messages ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. It means it will work like now, with sometimes inconsistent view as mentioned in #2405 because of the 30 minutes caching interval. This is also a subject to change if desired, but in different PR.

@vladak vladak merged commit 7d84fb5 into oracle:master Oct 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

opengrok main page becomes outdated because of caching
3 participants