Posts

Showing posts with the label Caching in plugins

Caching in Plugins

Do you need to cache some information as part of your Plugin Assembly? Shared variable has some limitations. You cannot set an expiry for it and access it from other plugins There are lot of Practical usages, you can add it on the comments section. Scenario 1: Accept or Process only one request in every hour even though you have lot of request came in. Ex: Lottery system Accept only one email/sms record in an Hour Scenario 2 As part of my implementation, I am sending an alert if third party system integration got failed. I have done the third party integration through CRM asynchronous plugin. I want to avoid multiple alerts on third party system unavailability and accumulate all the failed records while bulk processing scenario. You can have multiple ways to do it. Here I used a cache object as part of plugin implementation, it can set on first occurrence of the specific  error. Cached object is accessible on next plugin execution until it got expire...