#4448 Nbhd controller bindings are cached too heavily

v1.0.0
closed
sf-1 (616)
General
2015-08-20
2012-06-26
No

Revert the caching part of d305c88 (keep the nbhd model passing improvement). We have to load then nbhd model for each request, but we should make it only load the relevant neighborhood. (Perhaps add a unique index on url_prefix if that is what we use to query it)

Discussion

  • Jenny Steele - 2012-06-26
    • status: open --> in-progress
    • assigned_to: Jenny Steele
     
  • Dave Brondsema

    Dave Brondsema - 2012-06-26
    • summary: Reset nbhd controller bindings after changing their tools --> Nbhd controller bindings are cached too heavily
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,3 +1 @@
    -Currently in `controllers/root.py` the constructor calls `bind_controllers` just once, so that the neighborhoods are loaded once and then cached.  However, if a neighborhood admin installs a new tool or reorders their tools, then those changes are not reflected because the original neighborhood models are still bound.
    -
    -I think this can be fixed by calling `current_nbhd.bind_controller(RootController)` when a new nbhd tool is installed or a re-ordered.
    +Revert the caching part of d305c88 (keep the nbhd model passing improvement).  We have to load then nbhd model for each request, but we should make it only load the relevant neighborhood.  (Perhaps add a unique index on url_prefix if that is what we use to query it)
    
    • milestone: forge-backlog --> forge-jun-29
     
  • Jenny Steele - 2012-06-27
    • status: in-progress --> code-review
    • qa: Dave Brondsema
    • size: --> 1
      To test, make sure reordering neighborhood project tools is picked up correctly on page reload.
     
  • Dave Brondsema

    Dave Brondsema - 2012-06-27
    • status: code-review --> closed
     

Log in to post a comment.