Search Results for

    Show / Hide Table of Contents

    Class CacheAwareContentLoader

    A content loader that integrates the cache functionality Any file which is loaded via this content loader is stored in the cache and taken from there in future requests

    Inheritance
    Object
    CacheAwareContentLoader
    Namespace: i5.Toolkit.Core.Caching
    Assembly: cs.temp.dll.dll
    Syntax
    public class CacheAwareContentLoader : IContentLoader<string>

    Constructors

    CacheAwareContentLoader(IFileCache)

    Creates a new cache aware content loader

    Declaration
    public CacheAwareContentLoader(IFileCache cache = null)
    Parameters
    Type Name Description
    IFileCache cache

    A reference to the cache that should be used. If it is not set, it will be pulled via the service manager

    Properties

    Cache

    The cache where the downloaded content is stored

    Declaration
    public IFileCache Cache { get; set; }
    Property Value
    Type Description
    IFileCache

    InternalContentLoader

    The content loader which should be used for the actual access to the content By default, it is initialized with the UnityWebRequestLoader

    Declaration
    public IContentLoader<string> InternalContentLoader { get; set; }
    Property Value
    Type Description
    IContentLoader<String>

    Methods

    LoadAsync(String)

    Load the file that is specified by the uri. Uses the chache when possible.

    Declaration
    public async Task<WebResponse<string>> LoadAsync(string uri)
    Parameters
    Type Name Description
    String uri

    Path to the file that should be loaded.

    Returns
    Type Description
    Task<WebResponse<String>>

    Returns the loaded file, either from cache or the given uri

    In This Article
    Back to top i5 Toolkit Documentation