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