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

Hide
Sean Corfield added a comment -

Thanks Neil. I'll look at this (and CCACHE-52) when I get back from Conj. I don't see you listed here https://clojure.org/community/contributors – have you signed the Contributor's Agreement? (site updates tend to lag behind a bit).

Show
Sean Corfield added a comment - Thanks Neil. I'll look at this (and CCACHE-52) when I get back from Conj. I don't see you listed here https://clojure.org/community/contributors – have you signed the Contributor's Agreement? (site updates tend to lag behind a bit).
Hide
Neil Prosser added a comment -

Thanks for that. Yes. I filled it out just before I created CCACHE-52 this morning. However, it didn't ask me for my name. I filled in all the fields and it said 'Complete' after I signed it. Happy to try again if my name doesn't appear in the list!

Show
Neil Prosser added a comment - Thanks for that. Yes. I filled it out just before I created CCACHE-52 this morning. However, it didn't ask me for my name. I filled in all the fields and it said 'Complete' after I signed it. Happy to try again if my name doesn't appear in the list!
Hide
Sean Corfield added a comment -

No problem. The list is updated manually and folks are tied up with Conj this week. I'll try to ping Alex while I'm here and confirm your CA is on file.

Show
Sean Corfield added a comment - No problem. The list is updated manually and folks are tied up with Conj this week. I'll try to ping Alex while I'm here and confirm your CA is on file.
Hide
Neil Prosser added a comment -

I've signed the agreement again just to make sure. Still not seeing anything on the contributors page. Is there a problem with the updating process?

Show
Neil Prosser added a comment - I've signed the agreement again just to make sure. Still not seeing anything on the contributors page. Is there a problem with the updating process?
Hide
Sean Corfield added a comment -

I've pinged Alex again. I gather the site publishing process just broke due to some infrastructure changes so things are more manual than usual. Thanks for the reminder!

Show
Sean Corfield added a comment - I've pinged Alex again. I gather the site publishing process just broke due to some infrastructure changes so things are more manual than usual. Thanks for the reminder!
Hide
Sean Corfield added a comment -

They have not received your signed agreement. There's an email verification step – did you get the email? Did you click on the verification link? Without that step, the process isn't complete.

Show
Sean Corfield added a comment - They have not received your signed agreement. There's an email verification step – did you get the email? Did you click on the verification link? Without that step, the process isn't complete.
Hide
Neil Prosser added a comment -

My apologies. It turns out that running through the process twice wasn't enough for me to spot the 'Click here to sign' button hidden under the cookie warning (which I now find I ignore across all sites).

I have had the email confirmation and it all looks like it has gone through.

Show
Neil Prosser added a comment - My apologies. It turns out that running through the process twice wasn't enough for me to spot the 'Click here to sign' button hidden under the cookie warning (which I now find I ignore across all sites). I have had the email confirmation and it all looks like it has gone through.
Hide
Sean Corfield added a comment -

Alex confirmed receipt of your CLA. Thank you! I'll probably take a look at these issues over the holiday break some time.

Show
Sean Corfield added a comment - Alex confirmed receipt of your CLA. Thank you! I'll probably take a look at these issues over the holiday break some time.
Hide
Sean Corfield added a comment -

Will be in 0.7.2

Show
Sean Corfield added a comment - Will be in 0.7.2

People

Vote (1)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: