Skip to content
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

Adding Least Recently Used (LRU) caching to pathing functions #76

Open
axiomcura opened this issue Aug 14, 2023 · 0 comments
Open

Adding Least Recently Used (LRU) caching to pathing functions #76

axiomcura opened this issue Aug 14, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@axiomcura
Copy link
Member

According to functools documentation implementing lru_cache on function memorizes the output generated.

This means any recursive searches will not be executed again if the output is cached.

It is very simple to implement. Here's an example below:

def test(input: str) -> str:
    # code below
from functools import rlu_cache

@rlu_cache
def test(input: str) -> str:
    #code below

To implement only requires a decorator.

@axiomcura axiomcura added the enhancement New feature or request label Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant