Skip to content

Latest commit

 

History

History
64 lines (38 loc) · 1.99 KB

tech_caching.rst

File metadata and controls

64 lines (38 loc) · 1.99 KB

Caching

Basics

This package automatically caches the results of all queries made to external resources. This includes the results of:

Note

As of now the size of the cache is and can not be limited. If you run into issues with regards of memory usage, try :ref:`to clear the cache <clearing_cache>`.

Usage

Disabling Caching

Caching can be manually disabling on a "per call" level by setting the caching parameter of a cached method to False, as shown in the example below.

df_linked = label_linker(df, column='author', caching=False)

At the moment it is not possible to easily disable caching for all methods at once.

Checking the Cache Status

To check the status of the cache, call the :meth:`show_cache_info() <kgextension.caching_helper.show_cache_info()>` method, as shown in the example below.

from kgextension.caching_helper import show_cache_info

show_cache_info()

Clearing the Cache

To clear the cache, call the :meth:`clear_cache() <kgextension.caching_helper.clear_cache()>` method, as shown in the example below.

from kgextension.caching_helper import clear_cache

clear_cache()