Update code from https://github.com/dmi-try/marionette-collective
[packages/precise/mcollective.git] / website / messages / PLMC14.md
1 ---
2 layout: default
3 title: Message detail for PLMC14
4 toc: false
5 ---
6
7 Example Message
8 ---------------
9
10     No block supplied to synchronize on cache 'my_cache'
11
12 Additional Information
13 ----------------------
14
15 When using the Cache to synchronize your own code across agents or other plugins you have to supply a block to synchronise.
16
17 Correct usage would be:
18
19     Cache.setup(:customer, 600)
20     Cache(:customer).synchronize do
21        # update customer record
22     end
23
24 This error is raise when the logic to update the customer record is not in a block as in the example