Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for lruCache (0.16 sec)

  1. pilot/pkg/model/typed_xds_cache.go

    }
    
    type evictKeyConfigs[K comparable] struct {
    	key              K
    	dependentConfigs []ConfigHash
    }
    
    type lruCache[K comparable] struct {
    	enableAssertions bool
    	store            simplelru.LRUCache[K, cacheValue]
    	// token stores the latest token of the store, used to prevent stale data overwrite.
    	// It is refreshed when Clear or ClearAll are called
    	token       CacheToken
    	mu          sync.RWMutex
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Mar 30 05:26:03 UTC 2024
    - 11K bytes
    - Viewed (0)
  2. pilot/pkg/model/typed_xds_cache_test.go

    			ConfigKey{Kind: kind.DestinationRule, Name: "name", Namespace: "namespace"}.HashCode(),
    		},
    	}
    
    	c := newTypedXdsCache[uint64]()
    
    	cache := c.(*lruCache[uint64])
    
    	assert.Equal(t, cache.store.Len(), 0)
    	assert.Equal(t, cache.indexLength(), 0)
    
    	// adding the entry populates the indexes
    	c.Add(firstEntry.Key(), firstEntry, req, res)
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jan 29 20:35:31 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  3. pkg/kubelet/clustertrustbundle/clustertrustbundle_manager.go

    import (
    	"encoding/pem"
    	"fmt"
    	"math/rand"
    	"time"
    
    	certificatesv1alpha1 "k8s.io/api/certificates/v1alpha1"
    	k8serrors "k8s.io/apimachinery/pkg/api/errors"
    	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    	lrucache "k8s.io/apimachinery/pkg/util/cache"
    	"k8s.io/apimachinery/pkg/util/sets"
    	certinformersv1alpha1 "k8s.io/client-go/informers/certificates/v1alpha1"
    	certlistersv1alpha1 "k8s.io/client-go/listers/certificates/v1alpha1"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 03 18:40:48 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  4. docs_src/settings/app03_an_py39/main.py

    from functools import lru_cache
    
    from fastapi import Depends, FastAPI
    from typing_extensions import Annotated
    
    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: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Oct 24 20:26:06 UTC 2023
    - 462 bytes
    - Viewed (0)
  5. docs_src/settings/app03/main.py

    from functools import lru_cache
    
    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: config.Settings = Depends(get_settings)):
        return {
            "app_name": settings.app_name,
            "admin_email": settings.admin_email,
            "items_per_user": settings.items_per_user,
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Oct 24 20:26:06 UTC 2023
    - 412 bytes
    - Viewed (0)
  6. docs_src/settings/app02_an/main.py

    from functools import lru_cache
    
    from fastapi import Depends, FastAPI
    from typing_extensions import Annotated
    
    from .config import Settings
    
    app = FastAPI()
    
    
    @lru_cache
    def get_settings():
        return Settings()
    
    
    @app.get("/info")
    async def info(settings: Annotated[Settings, Depends(get_settings)]):
        return {
            "app_name": settings.app_name,
            "admin_email": settings.admin_email,
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Oct 24 20:26:06 UTC 2023
    - 456 bytes
    - Viewed (0)
  7. docs_src/settings/app03_an/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: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Oct 24 20:26:06 UTC 2023
    - 451 bytes
    - Viewed (0)
  8. docs/de/docs/advanced/settings.md

    `@lru_cache` ist Teil von `functools`, welches Teil von Pythons Standardbibliothek ist. Weitere Informationen dazu finden Sie in der <a href="https://docs.python.org/3/library/functools.html#functools.lru_cache" class="external-link" target="_blank">Python Dokumentation für `@lru_cache`</a>.
    
    ## Zusammenfassung
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 30 20:17:14 UTC 2024
    - 17.8K bytes
    - Viewed (0)
  9. docs_src/settings/app02/main.py

    from functools import lru_cache
    
    from fastapi import Depends, FastAPI
    
    from .config import Settings
    
    app = FastAPI()
    
    
    @lru_cache
    def get_settings():
        return Settings()
    
    
    @app.get("/info")
    async def info(settings: Settings = Depends(get_settings)):
        return {
            "app_name": settings.app_name,
            "admin_email": settings.admin_email,
            "items_per_user": settings.items_per_user,
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Oct 24 20:26:06 UTC 2023
    - 406 bytes
    - Viewed (0)
  10. scripts/mkdocs_hooks.py

    from functools import lru_cache
    from pathlib import Path
    from typing import Any, List, Union
    
    import material
    from mkdocs.config.defaults import MkDocsConfig
    from mkdocs.structure.files import File, Files
    from mkdocs.structure.nav import Link, Navigation, Section
    from mkdocs.structure.pages import Page
    
    non_traslated_sections = [
        "reference/",
        "release-notes.md",
    ]
    
    
    @lru_cache
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Oct 24 20:26:06 UTC 2023
    - 5.1K bytes
    - Viewed (0)
Back to top