Renamed blender_cloud.cache to blender_cloud.http_cache.
This commit is contained in:
parent
5039a33053
commit
5f43b355b0
@ -47,12 +47,12 @@ if 'pillar' in locals():
|
||||
wheels.load_wheels()
|
||||
|
||||
pillar = importlib.reload(pillar)
|
||||
cache = importlib.reload(cache)
|
||||
cache = importlib.reload(http_cache)
|
||||
else:
|
||||
from . import wheels
|
||||
wheels.load_wheels()
|
||||
|
||||
from . import pillar, cache
|
||||
from . import pillar, http_cache
|
||||
|
||||
|
||||
def register():
|
||||
|
@ -9,7 +9,7 @@ import bpy
|
||||
from bpy.types import AddonPreferences, Operator, WindowManager, Scene
|
||||
from bpy.props import StringProperty
|
||||
|
||||
from . import pillar, gui, cache
|
||||
from . import pillar, gui, http_cache
|
||||
|
||||
ADDON_NAME = 'blender_cloud'
|
||||
|
||||
@ -106,7 +106,7 @@ def register():
|
||||
WindowManager.thumbnails_cache = StringProperty(
|
||||
name="Thumbnails cache",
|
||||
subtype='DIR_PATH',
|
||||
default=os.path.join(cache.cache_directory(), 'thumbnails'))
|
||||
default=os.path.join(http_cache.cache_directory(), 'thumbnails'))
|
||||
|
||||
WindowManager.blender_cloud_project = StringProperty(
|
||||
name="Blender Cloud project UUID",
|
||||
|
@ -1,4 +1,10 @@
|
||||
"""Cache management."""
|
||||
"""HTTP Cache management.
|
||||
|
||||
This module configures a cached session for the Requests package.
|
||||
It allows for filesystem-based caching of HTTP requests.
|
||||
|
||||
Requires the 3rd party packages CacheControl and lockfile.
|
||||
"""
|
||||
|
||||
import os
|
||||
import logging
|
||||
@ -44,4 +50,3 @@ def requests_session() -> requests.Session:
|
||||
cache=FileCache(cache_name))
|
||||
|
||||
return _session
|
||||
|
@ -10,7 +10,7 @@ import pillarsdk
|
||||
import pillarsdk.exceptions
|
||||
import pillarsdk.utils
|
||||
|
||||
from . import cache
|
||||
from . import http_cache
|
||||
|
||||
|
||||
_pillar_api = None # will become a pillarsdk.Api object.
|
||||
@ -65,7 +65,7 @@ def pillar_api(pillar_endpoint: str=None) -> pillarsdk.Api:
|
||||
from . import blender
|
||||
pillar_endpoint = blender.preferences().pillar_server
|
||||
|
||||
pillarsdk.Api.requests_session = cache.requests_session()
|
||||
pillarsdk.Api.requests_session = http_cache.requests_session()
|
||||
|
||||
_pillar_api = pillarsdk.Api(endpoint=pillar_endpoint,
|
||||
username=profile['username'],
|
||||
|
Reference in New Issue
Block a user