Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 16 of 16 for lru_cache (0.04 sec)

  1. docs_src/settings/app03_an_py39/main.py

    from functools import lru_cache
    from typing import Annotated
    
    from fastapi import Depends, FastAPI
    
    from . import config
    
    app = FastAPI()
    
    
    @lru_cache
    def get_settings():
        return config.Settings()
    
    
    @app.get("/info")
    async def info(settings: Annotated[config.Settings, Depends(get_settings)]):
        return {
            "app_name": settings.app_name,
            "admin_email": settings.admin_email,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 10 08:55:32 UTC 2025
    - 451 bytes
    - Viewed (0)
  2. fastapi/_compat/v2.py

    import re
    import warnings
    from collections.abc import Sequence
    from copy import copy, deepcopy
    from dataclasses import dataclass, is_dataclass
    from enum import Enum
    from functools import lru_cache
    from typing import (
        Annotated,
        Any,
        Union,
        cast,
    )
    
    from fastapi._compat import shared
    from fastapi.openapi.constants import REF_TEMPLATE
    from fastapi.types import IncEx, ModelNameMap, UnionType
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 19.1K bytes
    - Viewed (0)
  3. scripts/translate.py

    import json
    import secrets
    import subprocess
    from collections.abc import Iterable
    from functools import lru_cache
    from os import sep as pathsep
    from pathlib import Path
    from typing import Annotated
    
    import git
    import typer
    import yaml
    from github import Github
    from pydantic_ai import Agent
    from rich import print
    
    non_translated_sections = (
        f"reference{pathsep}",
        "release-notes.md",
        "fastapi-people.md",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 19:05:53 UTC 2025
    - 34.1K bytes
    - Viewed (0)
  4. docs/smb3-features/02-persistent-handles-design.md

    ### 10.1 Handle Caching Strategy
    ```java
    public class HandleCache {
        private final int maxHandles = 1000;
        private final LinkedHashMap<String, HandleInfo> lruCache;
        
        public HandleCache() {
            this.lruCache = new LinkedHashMap<String, HandleInfo>(maxHandles, 0.75f, true) {
                @Override
                protected boolean removeEldestEntry(Map.Entry<String, HandleInfo> eldest) {
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 02:53:50 UTC 2025
    - 31.6K bytes
    - Viewed (0)
  5. README.md

    String last = CollectionsUtil.getLast(sequenced);
    SequencedCollection<String> reversed = CollectionsUtil.reversed(sequenced);
    
    // Specialized collections
    LruHashMap<String, Object> lruCache = new LruHashMap<>(100); // LRU cache with max 100 entries
    CaseInsensitiveMap<String> configMap = new CaseInsensitiveMap<>();
    ```
    
    ### Resource Management
    ```java
    import org.codelibs.core.io.*;
    
    Registered: Sat Dec 20 08:55:33 UTC 2025
    - Last Modified: Sun Aug 31 02:56:02 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  6. docs/en/docs/release-notes.md

    * Start Portuguese translations. PR [#1210](https://github.com/tiangolo/fastapi/pull/1210) by [@cassiobotaro](https://github.com/cassiobotaro).
    * Update docs for Pydantic's `Settings` using a dependency with `@lru_cache()`. PR [#1214](https://github.com/tiangolo/fastapi/pull/1214).
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 19:06:15 UTC 2025
    - 586.7K bytes
    - Viewed (0)
Back to top