get_best_memcache
Returns the most efficient available memcache client class and a compatible key type by attempting to import pylibmc or falling back to a standard memcache implementation.
def get_best_memcache(
*args: any,
**kwargs: any
) - > tuple
Retrieves the most efficient available memcache client class and its associated key type based on the environment's installed libraries.
Parameters
| Name | Type | Description |
|---|---|---|
| *args | any | Positional arguments passed to the underlying memcache client initialization. |
| **kwargs | any | Keyword arguments passed to the underlying memcache client initialization, with 'behaviors' removed if pylibmc is unavailable. |
Returns
| Type | Description |
|---|---|
tuple | A tuple containing the memcache Client class (potentially wrapped for compatibility) and the type used for cache keys. |