---
title: "Discussion on \"Python's lru_cache Returns Stale Results When Your Function Reads a Mutable Global\" | Hashnode"
description: "Discussion on \"Python's lru_cache Returns Stale Results When Your Function Reads a Mutable Global\". I found this one the annoying way: a price that refused to change. I had a small function that multiplied a base price by a rate pulled from a config dict, and I had wrapped it in functools.lru_cache"
url: "https://hashnode.com/posts/python-s-lru-cache-returns-stale-results-when-your-function-reads-a-mutable-global/6af40a98e2cff360c1412cc2"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Python's lru\_cache Returns Stale Results When Your Function Reads a Mutable Global](https://aheadkit.hashnode.dev/python-s-lru-cache-returns-stale-results-when-your-function-reads-a-mutable-global?utm_source=hashnode&utm_medium=feed)

I found this one the annoying way: a price that refused to change. I had a small function that multiplied a base price by a rate pulled from a config dict, and I had wrapped it in functools.lru\_cache

2d ago · 4 min read · aheadkit.hashnode.dev  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#caching](https://hashnode.com/tag/caching)
-   [#debugging](https://hashnode.com/tag/debugging)

## Written by

[Abdus Salam](https://hashnode.com/@aheadkit)

@aheadkit

  
[View profile](https://hashnode.com/@aheadkit)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
