core.cache

Unnecessary get during SoftCache lookup

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
  • Patch:
    Code

Description

Currently during a lookup (without default value) on the SoftCache we'll use the result of (.get r) for the ::nil-check and then get it again as we're about to return it. It's possible this could result in inconsistency but it's also an unnecessary call.

I've provided a patch which reuses the result of the get for the check and return value.

Activity

Sean Corfield made changes -
Field Original Value New Value
Status Open [ 1 ] In Progress [ 3 ]
Sean Corfield made changes -
Resolution Completed [ 1 ]
Status In Progress [ 3 ] Resolved [ 5 ]
Sean Corfield made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (1)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: