There does seem to be something funky going on with the cache.

I changed:

<cache alias="SLActivityCodes">
                                <event-arg name="disableLayoutManager" 
value="true"/>
                                <event-arg name="variableToConvert"
value="ARRA2009SLActivityCodes"/>
                                <notify listener="specialLegislationListener"
method="getARRA2009SLActivityCodes"/>
                                <notify listener="AbstractGatewayListener" 
method="getJSONStr" />
                                <view-page name="gn_jsonContent" />
</cache>

to this:

<cache alias="SLActivityCodes">
                                <event-arg name="disableLayoutManager" 
value="true"/>
                                <event-arg name="variableToConvert"
value="ARRA2009SLActivityCodes"/>
                                <notify listener="specialLegislationListener"
method="getARRA2009SLActivityCodes"/>
                                <notify listener="AbstractGatewayListener" 
method="getJSONStr" />
                                
</cache>

<view-page name="gn_jsonContent" />


Basically, I took the view out of the cache, and the data size equalized and
all json validation passed.

Sami


On Thu, Nov 11, 2010 at 11:56 AM, Sami Hoda <[email protected]> wrote:

> Using Firebug, I tried to see if the content was any different. Visually
> its hard to tell. However, looking at this, it seems the one returned from
> cache is 3k greater in size.
>
> Firebug
>
> First call (no M2 Cache)
> Data Size    61966
>
> 2nd Call (from M2 Cache)
> Data Size    64354
>
> Digging deeper.
>
> Sami
>
>
>
> On Thu, Nov 11, 2010 at 11:49 AM, Sami Hoda <[email protected]> wrote:
>
>> Ugh... so the plot thickens!
>>
>> I added this:
>> <cfset addHTTPHeader(name="Content-Type",value="text/plain")/>
>>
>> And looking at it in Firebug, the correct content-type was being set.
>>
>> When I enable the caching once again, it FAILED! Some error - Invalid
>> JSON, even though the header value is now correct.
>>
>> I wonder if Mach II cache is doing something else to the content itself...
>>
>> Sami
>>
>>
>>
>> On Thu, Nov 11, 2010 at 11:45 AM, Sami Hoda <[email protected]> wrote:
>>
>>> No, I meant that Mach II would intelligently try to guess what i returned
>>> through the output stream, and could intelligently add the right header
>>> auto-magically.
>>>
>>> Sami
>>>
>>>
>>>
>>> On Thu, Nov 11, 2010 at 11:43 AM, Peter J. Farrell <[email protected]>wrote:
>>>
>>>> Sami Hoda said the following on 11/11/2010 01:37 PM:
>>>>
>>>>  Never mind. I guess what you would need in some intelligent script that
>>>>> would guess the content type and try to set the appropriate headers for 
>>>>> you,
>>>>> which can be overriden.
>>>>>
>>>> We do observe all headers set by addHTTPHeaderByName/StatusCode() and
>>>> therefore the cache can reply those for you if they are sent in a cache
>>>> block.  You are already setting the header via cfcontent, but switch to
>>>> addHttpHeaderByName() and cache can replay that.
>>>>
>>>>
>>>> --
>>>> You received this message because you are subscribed to Mach-II for CFML
>>>> list.
>>>> To post to this group, send email to
>>>> [email protected]
>>>> To unsubscribe from this group, send email to
>>>> [email protected]
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/mach-ii-for-coldfusion?hl=en
>>>>
>>>> SVN: http://svn.mach-ii.com/machii/
>>>> Wiki / Documentation / Tickets: http://trac.mach-ii.com/machii/
>>>>
>>>
>>>
>>
>

-- 
You received this message because you are subscribed to Mach-II for CFML list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/mach-ii-for-coldfusion?hl=en

SVN: http://svn.mach-ii.com/machii/
Wiki / Documentation / Tickets: http://trac.mach-ii.com/machii/

Reply via email to