Cache calculated values when we know they won't change.

Review Request #4815 — Created Oct. 21, 2013 and submitted

Information

Djblets
release-0.7.x

Reviewers

Cache calculated values when we know they won't change.

We frequently get the name and name_plural properties of an API
resource. In the case where a resource doesn't explicitly set them, we
calculate them, and we do this every time it's accessed, even though
it'll never change. Instead, cache these values and only calculate them
once.

Unit tests pass.

david
  1. Ship It!

  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Loading...