club-1 / flarum-ext-cross-references

Add cross reference links when a discussion is mentioned from another one.
GNU Affero General Public License v3.0
6 stars 1 forks source link

Convert responseErrors cache to an LRU cache #40

Open n-peugnet opened 1 year ago

n-peugnet commented 1 year ago

This should not be too hard to do. Given it is currently a FIFO one, it is implemented with a simply linked list. We wilk have to use a doubly linked list instead to be able to move the elements.

https://github.com/club-1/flarum-ext-cross-references/blob/aa2d4001fb80c325c428f858f0949f36467bdd73/js/src/forum/cache.ts#L80