<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>yuta-nakata</author_name>
  <author_url>https://blog.hatena.ne.jp/yuta-nakata/</author_url>
  <blog_title>Yuta NakataのBlog</blog_title>
  <blog_url>https://www.yuta-nakata.net/</blog_url>
  <categories>
    <anon>Python</anon>
    <anon>IT</anon>
    <anon>やってみた</anon>
  </categories>
  <description>ランキング参加中Python 結論 具体例 使い方のイメージ 結論 pythonには、lru_cacheと呼ばれる標準機能があります。 個人的に、納得できる解説がなかったので、ここにまとめます。 結論、下記のようにまとめられます。 言葉で説明すると、 メソッドのある引数に対する計算結果を保存しておき、後で同じ引数が与えられた時、計算結果を再利用するというものである。 となります。 では、具体例を見ていきましょう。 具体例 そもそも、lru_cacheは、 from functools import lru_cache のように使用します。 以下、サンプルコードを考えてみましょう。 from f…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.yuta-nakata.net%2Fentry%2F2023%2F11%2F18%2F141029&quot; title=&quot;【Python】lru_cacheの使い方と仕組み｜関数の実行結果をキャッシュして高速化 - Yuta NakataのBlog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/y/yuta-nakata/20231118/20231118135851.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-11-18 14:10:29</published>
  <title>【Python】lru_cacheの使い方と仕組み｜関数の実行結果をキャッシュして高速化</title>
  <type>rich</type>
  <url>https://www.yuta-nakata.net/entry/2023/11/18/141029</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
