@@ -2712,21 +2712,27 @@ msgstr "クラスはこのように使えます:"
27122712
27132713#: ../../faq/programming.rst:1952
27142714msgid "How do I cache method calls?"
2715- msgstr ""
2715+ msgstr "メソッド呼び出しをキャッシュするには どうしたらいいですか? "
27162716
27172717#: ../../faq/programming.rst:1954
27182718msgid ""
27192719"The two principal tools for caching methods are :func:`functools."
27202720"cached_property` and :func:`functools.lru_cache`. The former stores results "
27212721"at the instance level and the latter at the class level."
27222722msgstr ""
2723+ "メソッドキャッシュの主な道具は2つあり、 :func:`functools.cached_property` "
2724+ "と :func:`functools.lru_cache` です。前者はインスタンスレベル、後者はクラスレ"
2725+ "ベルで結果を保存します。"
27232726
27242727#: ../../faq/programming.rst:1959
27252728msgid ""
27262729"The *cached_property* approach only works with methods that do not take any "
27272730"arguments. It does not create a reference to the instance. The cached "
27282731"method result will be kept only as long as the instance is alive."
27292732msgstr ""
2733+ "*cached_property* アプローチは、引数を取らないメソッドでのみ働きます。これは"
2734+ "インスタンスへの参照を作りません。キャッシュされたメソッドの結果は、インスタ"
2735+ "ンスが生きている間だけ保持されます。"
27302736
27312737#: ../../faq/programming.rst:1963
27322738msgid ""
@@ -2735,6 +2741,9 @@ msgid ""
27352741"accumulate, so too will the accumulated method results. They can grow "
27362742"without bound."
27372743msgstr ""
2744+ "利点は、インスタンスが使われなくなった場合、キャッシュされたメソッドの結果が"
2745+ "すぐに解放されることです。欠点は、インスタンスが溜まると、溜められたメソッド"
2746+ "の結果も増えてしまうことです。それらは際限なく増える恐れがあります。"
27382747
27392748#: ../../faq/programming.rst:1968
27402749msgid ""
@@ -2749,17 +2758,24 @@ msgid ""
27492758"bounded by the specified *maxsize*. The disadvantage is that instances are "
27502759"kept alive until they age out of the cache or until the cache is cleared."
27512760msgstr ""
2761+ "least recently used アルゴリズム(訳注:LRU 直近に使われたものを残す)の利点"
2762+ "は、キャッシュが指定された *maxsize* で制限されることです。欠点は、キャッシュ"
2763+ "から期限切れで追い出されるかクリアされるまで、インスタンスが生き続けることで"
2764+ "す。"
27522765
27532766#: ../../faq/programming.rst:1977
27542767msgid "This example shows the various techniques::"
2755- msgstr ""
2768+ msgstr "この例は各種テクニックを示します:: "
27562769
27572770#: ../../faq/programming.rst:2001
27582771msgid ""
27592772"The above example assumes that the *station_id* never changes. If the "
27602773"relevant instance attributes are mutable, the *cached_property* approach "
27612774"can't be made to work because it cannot detect changes to the attributes."
27622775msgstr ""
2776+ "上の例では、 *station_id* が常に変わらないことを前提としています。関連するイ"
2777+ "ンスタンスの属性が可変である場合、 *cached_property* アプローチは属性の変更を"
2778+ "検出できないため、機能しなくなります。"
27632779
27642780#: ../../faq/programming.rst:2006
27652781msgid ""