sqlalchemy / sqlalchemy/dogpile.cache

Logging/Events

Open
#69 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
Python
Stars
299
Forks
50
PR merge metrics
No merged PRs in 30d

Description

Migrated issue, originally created by jvanasco (jvanasco)

This may be too much of a performance hit, if so -- it's an inappropriate idea.

I needed to create a logging/auditing trail of Dogpile interaction for a Pyramid application -- to track where there were cache hits/misses and what keys are being requested.

The only way I could handle this was to create a ProxyBackend that intercepted select calls, and handled the auditing.

That's not so bad itself -- I've been using this for months. However I couldn't find a good way do deal with tracking the region when I tried to release the code today. I thought about using a factory pattern to create a series "region customized" loggers, but that would limit how the logger is utilized (a user couldn't simply use a config file based setup, there would be a bit of manual work needed).

I started thinking about the SqlAlchemy events model, and wondered if that would be useful in dogpile -- or just overkill.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by reviewing the existing ProxyBackend approach and how region configuration is handled, then assess whether an events model can expose cache hits, misses, requested keys, and region context. Done would require a decided design and clear implementation scope for logging or auditing Dogpile interactions.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sqlalchemy
Domain
backend, observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.