xiv-gear-planner / gear-planner

xivgear.app
https://xivgear.app/
18 stars 17 forks source link

Fix cycle sim cache keys #422

Closed xpdota closed 1 week ago

xpdota commented 2 weeks ago

Currently, only a single key is used:

        const setSpeed = set.isStatRelevant('spellspeed') ? set.computedStats.spellspeed : set.computedStats.skillspeed;
        if (setSpeed !== this.cachedSpeed) {
            this.cachedCycleProcessors = this.generateRotations(set);
            this.cachedSpeed = setSpeed;
        }

However, this fails in two circumstances:

Instead, consider using an array of relevant data as the cache key.