Emfield Calling
Oh emfield, why do you need information I already have?
In my previous post I spoke about caching issues. Still a valid discussion, but it got me to thinking. For an emfield image provider why would there need to be any calls to the provider api other then when initially creating a node or perhaps when updating the emfield field in a node?
I had noticed in my testing if I delete the cache table items for my smugmug provider the first time I hit the site it recreated whichever ones were on the home page. Note that I'm talking specifically emfield items in the cache table - not page cache or some other cache. So the question - if the node is storing the needed information about the embedded image item (direct path to image, title, etc.), then why is the provider called at all?
So what next? First check if other image providers exhibit similar behavior. If so, then I just coded it wrong. And if all image providers do this, is it by design or a feature request I need to put in for emfield? I'm inclined to think it is something that needs fixing. Perhaps something in the way cck hooks are calling for information? Anyway, since all the needed information should be in the "data" element that emfield stores data in, it shouldn't be too hard to solve. Just make sure we don't ask the provider for anything that we can easily retrieve from the field itself. In theory this should mean that the provider api should only be called when a node is initially created, or if a node is updated to point to a new provider item.
- winston's blog
- Login to post comments

