Skip to content

Commit

Permalink
fix(#2764):added new issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Yanich96 committed Jan 16, 2024
1 parent ba51a0d commit 3f2b35e
Showing 1 changed file with 9 additions and 2 deletions.
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
* ompare creation time of files.
* Don't forget to enable the tests.
*/
public final class OptCached implements Optimization {
Expand Down

0 comments on commit 3f2b35e

Please sign in to comment.