Re: [Django] #9334: The docs don't explain how django names cache keys

2 views
Skip to first unread message

Django

unread,
Jun 9, 2011, 5:40:19 AM6/9/11
to django-...@googlegroups.com
#9334: The docs don't explain how django names cache keys
-------------------------------------+-------------------------------------
Reporter: simon@… | Owner: Horst Gutmann
Type: New | <zerok@…>
feature | Status: new
Milestone: | Component: Documentation
Version: 1.0 | Severity: Normal
Resolution: | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Changes (by Horst Gutmann <zerok@…>):

* owner: nobody => Horst Gutmann <zerok@…>
* ui_ux: => 0
* easy: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/9334#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 9, 2011, 7:06:23 AM6/9/11
to django-...@googlegroups.com
#9334: The docs don't explain how django names cache keys
-------------------------------------+-------------------------------------
Reporter: simon@… | Owner: Horst Gutmann
Type: New | <zerok@…>
feature | Status: new
Milestone: | Component: Documentation
Version: 1.0 | Severity: Normal
Resolution: | Keywords:
Triage Stage: Accepted | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Changes (by Horst Gutmann <zerok@…>):

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/9334#comment:5>

Django

unread,
Jun 10, 2011, 5:17:32 AM6/10/11
to django-...@googlegroups.com
#9334: The docs don't explain how django names cache keys
-------------------------------------+-------------------------------------
Reporter: simon@… | Owner: Horst Gutmann
Type: New | <zerok@…>
feature | Status: new
Milestone: | Component: Documentation
Version: 1.0 | Severity: Normal
Resolution: | Keywords:
Triage Stage: Accepted | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------

Comment (by frearkvanderbos):

The part of the patch relating to the template cache key seems a-okay to
me. However the middleware cache key portion sits uneasy with me since it
mentions that it documents potentially unstable internals.

I wonder if this is in fact true. Parts of the key are generated with
functions starting with an underscore, but from the outside it is
generated with a single call to utils.cache.get_cache_key . I would assume
that this functions output is stable. Considering that, I think the note
about the key being potentially unstable could be remove.

Probably best that someone else also mentioned an opinion about that. :)

--
Ticket URL: <https://code.djangoproject.com/ticket/9334#comment:6>

Django

unread,
Jun 10, 2011, 7:25:01 AM6/10/11
to django-...@googlegroups.com
#9334: The docs don't explain how django names cache keys
-------------------------------------+-------------------------------------
Reporter: simon@… | Owner: Horst Gutmann
Type: New | <zerok@…>
feature | Status: new
Milestone: | Component: Documentation
Version: 1.0 | Severity: Normal
Resolution: | Keywords: dceu2011
Triage Stage: Accepted | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Changes (by Horst Gutmann <zerok@…>):

* keywords: => dceu2011


--
Ticket URL: <https://code.djangoproject.com/ticket/9334#comment:7>

Django

unread,
Jul 23, 2011, 8:45:45 AM7/23/11
to django-...@googlegroups.com
#9334: The docs don't explain how django names cache keys
-------------------------------------+-------------------------------------
Reporter: simon@… | Owner: Horst Gutmann
Type: New | <zerok@…>
feature | Status: new
Milestone: | Component: Documentation
Version: 1.0 | Severity: Normal
Resolution: | Keywords: dceu2011
Triage Stage: Accepted | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------

Comment (by aaugustin):

Paraphrasing the cache key generation code in the docs, like this patch
does, sounds inefficient to me. If a developer wants to determine a cache
key, what is (s)he supposed to do: roll his own implementation, based on
the docs? That doesn't make sense: the reference implementation is right
there in Django!

In my opinion, the proper way to resolve this problem is to specify a
public, stable API for computing cache keys, and document that.

This solution is:
- user friendly: it involves less work for developers who need this
feature,
- developer friendly: we keep the freedom to change the underlying
implementation if it contains design bugs, for instance if it's vulnerable
to collisions under some circumstances (this example is gross, but you get
the idea). For this reason, I'm afraid that the cure proposed by the
current patch is worse than the disease :)

Does someone else have an opinion on this? (I won't touch the flags until
I have more feedback.)

--
Ticket URL: <https://code.djangoproject.com/ticket/9334#comment:8>

Django

unread,
Jul 23, 2011, 7:16:29 PM7/23/11
to django-...@googlegroups.com
#9334: The docs don't explain how django names cache keys
---------------------------------------+-------------------------------
Reporter: simon@… | Owner:
Type: New feature | Status: new
Milestone: | Component: Documentation
Version: 1.0 | Severity: Normal
Resolution: | Keywords: dceu2011
Triage Stage: Accepted | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 1 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------+-------------------------------

Changes (by Horst Gutmann <zerok@…>):

* owner: Horst Gutmann <zerok@…> =>
* needs_better_patch: 0 => 1


Comment:

@aaugustin: I totally agree with you. The patch I posted was originally a
quick-shot and I intended to re-think it and talk with Russell or Jannis
about this during the DjangoCon EU sprints about it, but sadly other
things came in the way and I forgot about this issue. Sorry for that :-(
I'm all for making the cache-key generation part of a public API. I've
updated the flags and removed myself as owner since I probably won't have
time to actually do the implementation.

--
Ticket URL: <https://code.djangoproject.com/ticket/9334#comment:9>

Django

unread,
Dec 16, 2012, 2:46:58 PM12/16/12
to django-...@googlegroups.com
#9334: The docs don't explain how django names cache keys
-------------------------------+------------------------------------

Reporter: simon@… | Owner:
Type: New feature | Status: new
Component: Documentation | Version: 1.0
Severity: Normal | Resolution:
Keywords: dceu2011 | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------

Comment (by timo):

It looks to me like #19320 is a suggestion (with a patch) for public cache
API as discussed above. Perhaps we should close this ticket as a duplicate
of that one?

--
Ticket URL: <https://code.djangoproject.com/ticket/9334#comment:10>

Django

unread,
Jul 25, 2013, 12:49:18 PM7/25/13
to django-...@googlegroups.com
#9334: The docs don't explain how django names cache keys
-------------------------------+------------------------------------
Reporter: simon@… | Owner:
Type: New feature | Status: closed
Component: Documentation | Version: 1.0
Severity: Normal | Resolution: wontfix

Keywords: dceu2011 | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by timo):

* status: new => closed
* resolution: => wontfix


--
Ticket URL: <https://code.djangoproject.com/ticket/9334#comment:11>

Reply all
Reply to author
Forward
0 new messages