{"id":13806196,"url":"https://github.com/jvanasco/pyramid_debugtoolbar_dogpile","last_synced_at":"2025-07-17T16:40:40.544Z","repository":{"id":22882881,"uuid":"26230989","full_name":"jvanasco/pyramid_debugtoolbar_dogpile","owner":"jvanasco","description":"dogpile caching support for pyramid_debugtoolbar","archived":false,"fork":false,"pushed_at":"2023-09-21T00:59:05.000Z","size":251,"stargazers_count":2,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-16T13:05:24.954Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jvanasco.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.txt","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2014-11-05T17:27:06.000Z","updated_at":"2021-03-26T17:14:59.000Z","dependencies_parsed_at":"2024-01-03T01:30:49.556Z","dependency_job_id":null,"html_url":"https://github.com/jvanasco/pyramid_debugtoolbar_dogpile","commit_stats":{"total_commits":40,"total_committers":5,"mean_commits":8.0,"dds":0.09999999999999998,"last_synced_commit":"ee4e4a033cb5313c50d10d722e24af87f76bacc2"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/jvanasco/pyramid_debugtoolbar_dogpile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvanasco%2Fpyramid_debugtoolbar_dogpile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvanasco%2Fpyramid_debugtoolbar_dogpile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvanasco%2Fpyramid_debugtoolbar_dogpile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvanasco%2Fpyramid_debugtoolbar_dogpile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jvanasco","download_url":"https://codeload.github.com/jvanasco/pyramid_debugtoolbar_dogpile/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvanasco%2Fpyramid_debugtoolbar_dogpile/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265631369,"owners_count":23801804,"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":"2024-08-04T01:01:08.762Z","updated_at":"2025-07-17T16:40:40.523Z","avatar_url":"https://github.com/jvanasco.png","language":"Python","funding_links":[],"categories":["Debugging"],"sub_categories":[],"readme":"pyramid_debugtoolbar_dogpile\n============================\n\nBuild Status: ![Python package](https://github.com/jvanasco/pyramid_debugtoolbar_dogpile/workflows/Python%20package/badge.svg)\n\ndogpile caching support for pyramid_debugtoolbar\n\nThis package tracks the following dogpile api calls :\n\n\tget\n\tget_multi\n\tset\n\tset_multi\n\tdelete\n\tdelete_multi\n\nYour pyramid_debugtoolbar will have a \"Dogpile\" panel that lists:\n\n* the number of calls (in tab header)\n* statistics on cache hits/misses/timing per api call type\n* a listing of all calls that features: call, key, hit/miss, timing\n\t\nAs of v0.1.4 you can filter the keys on the panel. yay.\n\nThis package works by wrapping requests to dogpile regions into a Proxy Backend.  This has a significant performance overhead and relies on the DEBUG ONLY `get_current_request`, so make sure that you disable this LoggingProxy on production machines.\n\nAs of v0.1.5 you can sort-of track payload sizes.  This is **very experimental**.  See below.\n\nThis package works in Python2.7 and Python 3.x\n\n\nhow to use this package\n=======================\n\n## install via github's main or grab a pypi distribution!\n\n\tpip install pyramid_debugtoolbar_dogpile\n\teasy_install pyramid_debugtoolbar_dogpile\n\n## update your ENVIRONMENT.ini file\n\n    pyramid.includes = pyramid_debugtoolbar\n    debugtoolbar.includes = pyramid_debugtoolbar_dogpile\n\n## update your caching configuration to use the proxy:\n\n    from pyramid_debugtoolbar_dogpile import LoggingProxy as DogpileLoggingProxy\n\n    cache_config = {}\n    ...\n    cache_config['wrap'] = [DogpileLoggingProxy, ]\n    region = make_region()\n    region.configure_from_config(cache_config)\n\n\nTracking Payload Size\n=======================\n\nTracking Payload Size is experimental and VERY TRICKY because the correct hooks do not live in the standard packages.  Most users will not be able to do it -- or want to do it.\n\nNOTE: This breaks/abuses dogpile's API.\n\nIn order to track payload size, you must write a custom backend OR use a backend that supports custom serializers, and \"repack\" the CachedValues with a \"sz\" attribute in the metadata.\n\nThis specialized serialize for an alternate Redis backend, https://github.com/jvanasco/dogpile_backend_redis_advanced, injects a payload size attribute into CachedValues\n\n\tdef SerializerPickleInt_loads(value):\n\t\t\"\"\"build a new CachedValue\"\"\"\n\t\tserialized_size = len(value)\n\t\tvalue = cPickle.loads(value)\n\t\treturn CachedValue(value[0],\n\t\t\t\t\t\t   {\"ct\": value[1],\n\t\t\t\t\t\t\t\"v\": value_version,\n\t\t\t\t\t\t\t\"sz\": serialized_size,\n\t\t\t\t\t\t\t})\n\nIf this package detects any size payloads in the tracked values, it will display size columns that report the number of bytes per key (and in aggregate reports).  If the package\ndoes not detect any `sz` payloads, it will not display the \"Size\" columns.\n\nWhy track size?\n\nSome routes in a project were taking too much time, even with caching.  Tracking size - in addition to time - made it easier to pinpoint problematic objects and create a different/leaner caching object.\n\n\nWhat does it look like?\n=======================\n\nThe panel renders in two parts:\n\nFirst Section - topline statistics\n\nSecond Section - chronological list of cache operations. API calls and results are color-coded for quick review.\n\n![ScreenShot](https://raw.github.com/jvanasco/pyramid_debugtoolbar_dogpile/main/screenshot.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjvanasco%2Fpyramid_debugtoolbar_dogpile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjvanasco%2Fpyramid_debugtoolbar_dogpile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjvanasco%2Fpyramid_debugtoolbar_dogpile/lists"}