[openstreetmap/openstreetmap-website] Cache social link platform and name at save time (PR #6950)

Pablo Brasero notifications at github.com
Tue Mar 31 14:39:51 UTC 2026


pablobm left a comment (openstreetmap/openstreetmap-website#6950)

I think we can avoid the migration here if we use Rails's cache mechanism. How about we surround the relevant code (each entry in `app/views/social_links/_show.html.erb`) with something like `Rails.cache.fetch("social_link/#{social_link.url}")`? Or something to that effect. We cache the link and any changes to the URL will result in a cache miss, so we don't have to worry about invalidating it.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6950?email_source=notifications&email_token=AAK2OLOBVYEEHWOMI7Q6QGL4TPKDPA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMJWGMYTIMJUG43KM4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOS2XA4S7MNXW23LFNZ2F633QMVXF6Y3MNFRWW#issuecomment-4163141476
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/6950/c4163141476 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260331/ccf1cb4f/attachment.htm>


More information about the rails-dev mailing list