List Info

Thread: cache .xml files




cache .xml files
user name
2007-06-28 08:13:57
Hello,

it seems that the Smarty cache creates .html files. Is it
possible to 
instruct it to cache .xml files? I need this to cache RSS
feeds.

Thanks,
Iv

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


Re: cache .xml files
user name
2007-06-28 08:17:27
On Thu, Jun 28, 2007 at 03:13:57PM +0200, poboxverysmall.org wrote:
> Hello,
> 
> it seems that the Smarty cache creates .html files. Is
it possible to 
> instruct it to cache .xml files? I need this to cache
RSS feeds.

Smarty just caches text files - a superset of xml and html
files.
 
> Thanks,
> Iv

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


Re: cache .xml files
user name
2007-06-28 08:37:07
messju mohr wrote:
> On Thu, Jun 28, 2007 at 03:13:57PM +0200, poboxverysmall.org wrote:
>> Hello,
>>
>> it seems that the Smarty cache creates .html files.
Is it possible to 
>> instruct it to cache .xml files? I need this to
cache RSS feeds.
> 
> Smarty just caches text files - a superset of xml and
html files.

The extension is .html as far as I can see and the RSS
Readers get 
headers as if the file is HTML - not XML.

--

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


Re: cache .xml files
user name
2007-06-28 08:40:36
On Thu, Jun 28, 2007 at 03:37:07PM +0200, poboxverysmall.org wrote:
> messju mohr wrote:
> >On Thu, Jun 28, 2007 at 03:13:57PM +0200, poboxverysmall.org wrote:
> >>Hello,
> >>
> >>it seems that the Smarty cache creates .html
files. Is it possible to 
> >>instruct it to cache .xml files? I need this to
cache RSS feeds.
> >
> >Smarty just caches text files - a superset of xml
and html files.
> 
> The extension is .html as far as I can see and the RSS
Readers get 
> headers as if the file is HTML - not XML.

you must not expose the cache files directly to the client
but have to
deliver them via $smarty->fetch() or
$smarty->display(). set the
correct content-type with php's header() function to please
your
clients.

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


Re: cache .xml files
user name
2007-06-28 08:45:08

poboxverysmall.org a écrit :
> messju mohr wrote:
>> On Thu, Jun 28, 2007 at 03:13:57PM +0200, poboxverysmall.org wrote:
>>> Hello,
>>>
>>> it seems that the Smarty cache creates .html
files. Is it possible 
>>> to instruct it to cache .xml files? I need this
to cache RSS feeds.
>>
>> Smarty just caches text files - a superset of xml
and html files.
>
> The extension is .html as far as I can see and the RSS
Readers get 
> headers as if the file is HTML - not XML.
>
> -- 
Hello

you can send a header
<?php header("content-type:text/xml"); ?>
to force the RSS Readers take the page in XML

Boris

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )