Skip to content

Commit

Permalink
Merge branch '__rultor'
Browse files Browse the repository at this point in the history
  • Loading branch information
rultor committed Jan 17, 2024
2 parents 37633ac + 6a7a66a commit 036be9f
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,18 @@
* Returns already optimized XML if it's found in the cache.
*
* @since 0.28.11
* @todo #2746:30min Use checksum, not time.
* @todo #2746:30min Fix caching mechanism in {@link OptCached}. Current
* The last modified time of the files between stages may be different,
* so it is not correct to do an equality comparison ({@code .equals(...)}).
* The last modification time of the file at the current stage
* must be less than or equal to the last modification time of file in cache at the next stage.
* The following tests show that fetching from the cache doesn't work correctly:
* - {@link OptCachedTest#returnsFromCacheCorrectProgram(Path path)},
* - {@link OptCachedTest#returnsFromCacheButTimesSaveAndExecuteDifferent(Path path)}.
* Need to fix the file validation from cache: using checksum, but not time.
* @todo #2746:30min Unify caching mechanism on stages: parse, optimize, pull and so on.
* Current implementations of caching on parsing stage and optimize stages work differently.
* In ParseMojo we have condition {@code if (tojo.hasHash()) }, in OptimizeMojo or ShakeMojo we
* compare creation time of files.
* Don't forget to enable the tests.
*/
public final class OptCached implements Optimization {
Expand Down

0 comments on commit 036be9f

Please sign in to comment.