... 生成された Web ページでキャッシュがどのように機能するかを説明する疑似コードです。 given a URL, try finding that page in the cache if the page is in the cache: return the cached page else: generate the page save the generated page in the cache (for next ... くかを指定しなければなりません。これはキャッシュのパフォーマンスに影響する重要な決定です。 キャッシュの設定は設定ファイルの CACHES 設定にあります。ここでは、 CACHES で使用可能なすべての値について説明します。 Memcached Memcached は完全にメモリベースのキ ... cebookやWikipediaなどのサイトで使用され、データベースへのアクセスを減らし、サイトのパフォーマンスを劇的に向上させます。 Memcached はデーモンとして動作し、指定された量の RAM が割り当てられます。キャッシュにデータを追加、取得、削除するための高速なインタ ... ... erity "low" according to the Django security policy . CVE-2026-8404: Potential exposure of private data via case-sensitive Cache-Control directives UpdateCacheMiddleware and cache_page() incorrectly cached responses marked with private Cache-Control d ... irectives when using mixed or uppercase values (e.g. Private ). The cache_control() decorator and patch_cache_control() function were not affected, since they normalize directives to lowercase. Th ... is issue only affects responses where Cache-Control is set manually. This issue has severity "low" according to the Django security policy . CVE-2026-35193: Potential ... ... erity "low" according to the Django security policy . CVE-2026-8404: Potential exposure of private data via case-sensitive Cache-Control directives UpdateCacheMiddleware and cache_page() incorrectly cached responses marked with private Cache-Control d ... irectives when using mixed or uppercase values (e.g. Private ). The cache_control() decorator and patch_cache_control() function were not affected, since they normalize directives to lowercase. Th ... is issue only affects responses where Cache-Control is set manually. This issue has severity "low" according to the Django security policy . CVE-2026-35193: Potential ... ... tions. App-loading refactor Historically, Django applications were tightly linked to models. A singleton known as the "app cache" dealt with both installed applications and models. The models module was used as an identifier for applications in many A ... the types of HttpResponse instances the middleware returns. django.contrib.sessions The "django.contrib.sessions.backends.cached_db" session backend now respects SESSION_CACHE_ALIAS . In previous versions, it always used the default cache. django.con ... e by setting the file_permissions_mode and directory_permissions_mode parameters. See collectstatic for example usage. The CachedStaticFilesStorage backend gets a sibling class called ManifestStaticFilesStorage that doesn't use the cache system at all ... ... and shell コマンドラインオプション --database changepassword コマンドラインオプション check コマンドラインオプション createcachetable コマンドラインオプション createsuperuser コマンドラインオプション dbshell コマンドラインオプション dumpdata コマンドラ ... マンドラインオプション --domain makemessages コマンドラインオプション --dry-run collectstatic コマンドラインオプション createcachetable コマンドラインオプション makemigrations コマンドラインオプション --durations test コマンドラインオプション --email cr ... ュール) (django.utils.translation モジュール) acycle_key() (backends.base.SessionBase のメソッド) add template filter add() (cache のメソッド) (GeometryCollection のメソッド) (RelatedManager のメソッド) add_action() (AdminSite のメソッド) add_arguments( ... ... エストヘッダを考慮すべきかを定義します。 詳しくは vary ヘッダを使う を参照してください。 キャッシュ django.views.decorators.cache のデコレータで、サーバーサイドとクライアントサイドのキャッシュを制御できます。 cache_control ( ** kwargs ) [ソース] このデ ... コレータはレスポンスの Cache-Control ヘッダにキーワード引数を全て追加してパッチを適用します。変換の詳細については patch_cache_control() を参照してくださ ... い。 never_cache ( view_func ) [ソース] このデコレータは、現在の日付/時刻に Expires ヘッダを追加します。 このデコレータは、 Cache-Control: ... ... する内容のみが 安定版として提供され、また後方互換性を維持しています。 django.utils.cache このモジュールには、HTTPキャッシュの制御を補助するための関数が含まれています。これは、レスポンスの Vary ヘッダーを管理する ... す。 たとえば、 国際化のためのミドルウェア は、 Accept-language ヘッダーによってキャッシュを区別するようにしています。 patch_cache_control ( response , ** kwargs ) [ソース] この関数は、キーワード引数を Cache-Control ヘッダーに追加することで、ヘッダーをパ ... のみを追加する すべての他のパラメータは、その値に str() を適用した後に追加する get_max_age ( response ) [ソース] レスポンスのCache-Controlヘッダーから max-age を整数として返します(見つからなかった場合や整数でなかった場合は None を返します)。 patch_res ... ... n which prevented using a language not in Django's default language list ( LANGUAGES ) ( #25915 ). django.views.decorators.cache.never_cache() now sends more persuasive headers (added no-cache, no-store, must-revalidate to Cache-Control ) to better pr ... ... their views synchronous, and only have a select few running in async mode - but it is entirely your choice. Django's ORM, cache layer, and other pieces of code that do long-running network calls do not yet support async access. We expect to add suppo ... nd cross-site requests. django.contrib.staticfiles The STATICFILES_DIRS setting now supports pathlib.Path . キャッシュ The cache_control() decorator and patch_cache_control() method now support multiple field names in the no-cache directive for the Ca ... in ): form = MyUserChangeForm admin . site . unregister ( User ) admin . site . register ( User , MyUserAdmin ) その他 The cache keys used by cache and generated by make_template_fragment_key() are different from the keys generated by older versions o ... ... ord argument of CheckConstraint will be removed. The OS_OPEN_FLAGS attribute of FileSystemStorage will be removed. The get_cache_name() method of FieldCacheMixin will be removed. 5.1 これらの変更の詳細については、 Django 4.2 リリースノート を参照してく ... SitemapIndexItem.__str__() メソッドは削除されます。 CSRF_COOKIE_MASKED 移行用設定は削除されます。 django.utils.functional.cached_property() の name 引数は削除されます。 django.contrib.postgres.constraints.ExclusionConstraint の opclasses 引数は削除さ ... erysetEqual() は、文字列の値と比較する際に、クエリセットに対して自動的に repr() を呼び出すことはなくなります。 django.core.cache.backends.memcached.MemcachedCache は削除されます。 django.contrib.messages.storage.cookie.CookieStorage で使用される、Djan ... 2026年10月08日