Talk:Cache API: Difference between revisions
From MoodleDocs
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
from Tim. | from Tim. | ||
1. In the "Using your cache object" section, you have | 1. In the "Using your cache object" section, you have set and delete returning a status. Surely it is better to have them throw an exception on error, and just return on success (like the DB API). | ||
2. make_with_params is not a great method name. Sadly, I can't do better. make_ad_hoc? make_one_off? make_custom? | 2. make_with_params is not a great method name. Sadly, I can't do better. make_ad_hoc? make_one_off? make_custom? | ||
3. I took the liberty of correcting one thing on [[Cache_API_-_Quick_reference]] to match [[Cache API]] (make -> make_with_params in Getting an ad-hoc cache instance section). However there are other things that need to be corrected that I am not sure about. I will leave them for you. | 3. I took the liberty of correcting one thing on [[Cache_API_-_Quick_reference]] to match [[Cache API]] (make -> make_with_params in Getting an ad-hoc cache instance section). However there are other things that need to be corrected that I am not sure about. I will leave them for you. |
Revision as of 20:43, 30 August 2012
Some comments
from Tim.
1. In the "Using your cache object" section, you have set and delete returning a status. Surely it is better to have them throw an exception on error, and just return on success (like the DB API).
2. make_with_params is not a great method name. Sadly, I can't do better. make_ad_hoc? make_one_off? make_custom?
3. I took the liberty of correcting one thing on Cache_API_-_Quick_reference to match Cache API (make -> make_with_params in Getting an ad-hoc cache instance section). However there are other things that need to be corrected that I am not sure about. I will leave them for you.