{"id":24973342,"url":"https://github.com/bluedynamics/bda.cache","last_synced_at":"2025-03-29T06:13:10.295Z","repository":{"id":1027829,"uuid":"855929","full_name":"bluedynamics/bda.cache","owner":"bluedynamics","description":"Simple caching infrastructure.","archived":false,"fork":false,"pushed_at":"2022-11-29T11:33:32.000Z","size":57,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-03T18:38:53.924Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://pypi.python.org/pypi/bda.cache","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bluedynamics.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-08-23T04:33:13.000Z","updated_at":"2024-01-12T18:04:25.000Z","dependencies_parsed_at":"2023-01-11T15:49:07.684Z","dependency_job_id":null,"html_url":"https://github.com/bluedynamics/bda.cache","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluedynamics%2Fbda.cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluedynamics%2Fbda.cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluedynamics%2Fbda.cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluedynamics%2Fbda.cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bluedynamics","download_url":"https://codeload.github.com/bluedynamics/bda.cache/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246145089,"owners_count":20730495,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-03T18:27:16.368Z","updated_at":"2025-03-29T06:13:10.272Z","avatar_url":"https://github.com/bluedynamics.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"General Caching API\n===================\n\nThis package is designed to be used by applications which require different\nkinds of caching flavour. This is abstracted due to the interfaces\n``ICacheProvider`` and  ``ICacheManager``. ICacheProvider takes care of the\nconcrete cache implementation, ICacheManager is the read/write interface.\n\nThe convention is to adapt a concrete ICacheProvider implementation\n\n.. code-block:: python\n\n    from bda.cache import ICacheManager\n    from bda.cache import Memcached\n\n    provider = Memcached(['127.0.0.1:11211'])\n    manager = ICacheManager(provider)\n\nWe can ask the manager for data inside the cache\n\n.. code-block:: python\n\n    data = manager.get('somekey', force_reload=False)\n\nIf ``force_reload`` is set to True, try to delete data with key from cache and\nreturn None.\n\nWe're also able to manipulate the cache's data (some restrictions my result out\nof backend not providing them)\n\n.. code-block:: python\n\n    manager.set('somekey', object())\n\nThere exist a convenience to use some API's and cache it's results all at once.\n\n.. code-block:: python\n\n    data = manager.getData(func, key, force_reload=False, args=[], kwargs={})\n\nFirst the data for ``key`` is looked up inside the cache provider. If not found\nthere or if ``force_reload`` is set to True, call given ``func`` . The return\nvalue of this function will be stored in the cache provider. ``args`` and\n``kwargs`` are passed as parameters to given function if it's call is required.\n\nYou might ask why all this is done due to 2 seperate interfaces...\n\nSome usecase might require different cache providers i.e. for different payload\nsize. This way you can implement any other cache provider usage as well due to\nthe cache manager interface.\n\n\nDependencies\n------------\n\n- ``zope.interface``\n\n- ``zope.component``\n\n- ``bda.cache.fscache.FSCache`` recommends that availability of ``cpickle``\n\n- ``bda.cache.memcached.Memcached`` requires ``python-memcached``\n\n\nNotes\n-----\n\nIf you're interessted to contribute; Feel free but keep in mind that this code\nis planned to be released under a BSD like licence in future.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluedynamics%2Fbda.cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbluedynamics%2Fbda.cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluedynamics%2Fbda.cache/lists"}