Re: [WebDNA] Cacheing include files
This WebDNA talk-list message is from 2015
It keeps the original formatting.
numero = 112188
interpreted = N
texte = Hi Brian,Not sure why this isn=92t the default=85 but this seems to work for me:in webdna.conf----------------------------- add:
deny from allThen edit similar to:
AddType text/html .tpl .dna .incAddHandler webcatalog2-handler .tpl .tmpl .html .htm .dna .inc----------------------------------------------Then =91service apache2 reload=92HTH,DonovanOn Mar 16, 2015, at 6:15 PM, Stuart Tremain
wrote:> Brian>=20> If the .frag file is only ever to be included and displayed in an HTML =file why don=92t you use a SHOWIF.>=20> At the top of the HTML a TEXT var i.e. [TEXT]SHOWFRAG=3DT[/TEXT], then =wrap the contents of the .frag=20>=20> [SHOWIF [SHOWFRAG]=3DT]> FRAG CONTENTS> [/SHOWIF]>=20> Then if the .frag file is ever served the content will be nothing.>=20>=20> Kind regards>=20> Stuart Tremain> IDFK Web Developments> AUSTRALIA> webdna@idfk.com.au>=20>=20>=20>=20>=20>> On 17 Mar 2015, at 09:37, Brian Burton wrote:>>=20>> Ken,>>=20>> I=92m doing Ok on writing out the fragments, and using them as =[include]=92d content as needed. I do not write out a whole page of html =because I have personalized dynamic content on other parts of the page.=20=>>=20>> The concern is have is, and why i don=92t want this mapped as a =template is that the webserver will serve up template files when =requested. i.e. if you have storefunctions.inc as a file, and someone is =savvy enough to request it, either it isn=92t mapped to webdna, and =Apache happily serves up your raw webdna as text to who ever ask for it =(bad) or if it is mapped, then webdna will try to run any embedded code =and then return it to Apache to show to your malicious visitor. What I =want/need is an extension that webdna can cache, and yet that Apache =ignores, or refuses to acknowledge exists.=20>>=20>> I feel like I=92m overlooking something, but I haven=92t had enough =time to dig in and find a good solution. Has anyone solved this already?>>=20>>=20>> -Brian B.=20>>=20>>=20>>> On Mar 16, 2015, at 4:45 PM, Kenneth Grome =wrote:>>>=20>>> I would write a WebDNA script that runs automatically once a day>>> (via cron, trigger, etc.) and writes complete .html files, one for>>> every author, overwriting whatever matching files were already>>> there. Then you know for a fact that all these pages are>>> up-to-date as of today, and WebDNA never has to do any of the hard>>> work at the time the visitor actually requests one of these pages.>>>=20>>> If you don't like this idea and instead you actually want WebDNA>>> to cache your .inc and .frag files you can change their suffixes>>> to one that WebDNA is already processing, or add .inc and .frag to>>> your WebCatalog "ValidTemplateExtensions" preference and to the>>> "AddHandler webcatalog2-handler" directive in Apache's webdna.conf>>> file.>>>=20>>> Regards,>>> Kenneth Grome>>> WebDNA Solutions>>> http://www.webdnasolutions.com>>> Web Database Systems and Linux Server Management>>>=20>>>=20>>> On 03/16/2015 02:04 PM, Brian Burton wrote:>>>> Greetings!>>>>=20>>>> What is the WebDNA community doing for cacheing page fragment>>>> files? On my website I have some pages that require significant>>>> processing to generate the visible content. To save time, I>>>> only render it out the processing intense parts once an hour or>>>> day or whatever (as required). I save this out as a fragment of>>>> HTML in a file (with an .inc or .frag extension)>>>>=20>>>> An example of this might be a database of books, and I need to>>>> create a page that has as html links, a list of unique authors>>>> and a count of books attributed to that author. Rather then do>>>> this every time the page is requested, i first check to see if>>>> the fragment exists, then check to see if it=92s current, and>>>> then if both of those are false I render out the html, save it>>>> in a new fragment file, and display it to the user.>>>>=20>>>> SO.. here=92s my question: the fragments are saved as .inc or>>>> .frag. WebDNA does not cache these as they are neither>>>> templates nor databases. This causes a lot of disk activity as>>>> I use fragments extensively to speed up the the quasi-static>>>> parts of the website. How can I get webdna to cache these? I am>>>> hesitant to add the extensions to the template field in the>>>> settings. I do not want the fragment under any circumstance to>>>> be able to be directly accessed by a web visitor. Should I>>>> block the extension from being served by Apache? Would it be>>>> possible to get a third cache field type in the webdna>>>> settings? Thoughts? Suggestions?>>>>=20>>>> Thanks! Brian B.=20>>>> --------------------------------------------------------- This>>>> message is sent to you because you are subscribed to the>>>> mailing list . To unsubscribe, E-mail to:>>>> archives:>>>> http://mail.webdna.us/list/talk@webdna.us Bug Reporting:>>>> support@webdna.us>>>>=20>>> --------------------------------------------------------->>> This message is sent to you because you are subscribed to>>> the mailing list .>>> To unsubscribe, E-mail to: >>> archives: http://mail.webdna.us/list/talk@webdna.us>>> Bug Reporting: support@webdna.us>>>=20>>=20>>=20>> --------------------------------------------------------->> This message is sent to you because you are subscribed to>> the mailing list .>> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us>> Bug Reporting: support@webdna.us>=20> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> Bug Reporting: support@webdna.us
Associated Messages, from the most recent to the oldest:
Hi Brian,Not sure why this isn=92t the default=85 but this seems to work for me:in webdna.conf----------------------------- add:deny from allThen edit similar to:AddType text/html .tpl .dna .incAddHandler webcatalog2-handler .tpl .tmpl .html .htm .dna .inc----------------------------------------------Then =91service apache2 reload=92HTH,DonovanOn Mar 16, 2015, at 6:15 PM, Stuart Tremain wrote:> Brian>=20> If the .frag file is only ever to be included and displayed in an HTML =file why don=92t you use a SHOWIF.>=20> At the top of the HTML a TEXT var i.e. [text]SHOWFRAG=3DT[/TEXT], then =wrap the contents of the .frag=20>=20> [SHOWIF [SHOWFRAG]=3DT]> FRAG CONTENTS> [/SHOWIF]>=20> Then if the .frag file is ever served the content will be nothing.>=20>=20> Kind regards>=20> Stuart Tremain> IDFK Web Developments> AUSTRALIA> webdna@idfk.com.au>=20>=20>=20>=20>=20>> On 17 Mar 2015, at 09:37, Brian Burton wrote:>>=20>> Ken,>>=20>> I=92m doing Ok on writing out the fragments, and using them as =[include]=92d content as needed. I do not write out a whole page of html =because I have personalized dynamic content on other parts of the page.=20=>>=20>> The concern is have is, and why i don=92t want this mapped as a =template is that the webserver will serve up template files when =requested. i.e. if you have storefunctions.inc as a file, and someone is =savvy enough to request it, either it isn=92t mapped to webdna, and =Apache happily serves up your raw webdna as text to who ever ask for it =(bad) or if it is mapped, then webdna will try to run any embedded code =and then return it to Apache to show to your malicious visitor. What I =want/need is an extension that webdna can cache, and yet that Apache =ignores, or refuses to acknowledge exists.=20>>=20>> I feel like I=92m overlooking something, but I haven=92t had enough =time to dig in and find a good solution. Has anyone solved this already?>>=20>>=20>> -Brian B.=20>>=20>>=20>>> On Mar 16, 2015, at 4:45 PM, Kenneth Grome =wrote:>>>=20>>> I would write a WebDNA script that runs automatically once a day>>> (via cron, trigger, etc.) and writes complete .html files, one for>>> every author, overwriting whatever matching files were already>>> there. Then you know for a fact that all these pages are>>> up-to-date as of today, and WebDNA never has to do any of the hard>>> work at the time the visitor actually requests one of these pages.>>>=20>>> If you don't like this idea and instead you actually want WebDNA>>> to cache your .inc and .frag files you can change their suffixes>>> to one that WebDNA is already processing, or add .inc and .frag to>>> your WebCatalog "ValidTemplateExtensions" preference and to the>>> "AddHandler webcatalog2-handler" directive in Apache's webdna.conf>>> file.>>>=20>>> Regards,>>> Kenneth Grome>>> WebDNA Solutions>>> http://www.webdnasolutions.com>>> Web Database Systems and Linux Server Management>>>=20>>>=20>>> On 03/16/2015 02:04 PM, Brian Burton wrote:>>>> Greetings!>>>>=20>>>> What is the WebDNA community doing for cacheing page fragment>>>> files? On my website I have some pages that require significant>>>> processing to generate the visible content. To save time, I>>>> only render it out the processing intense parts once an hour or>>>> day or whatever (as required). I save this out as a fragment of>>>> HTML in a file (with an .inc or .frag extension)>>>>=20>>>> An example of this might be a database of books, and I need to>>>> create a page that has as html links, a list of unique authors>>>> and a count of books attributed to that author. Rather then do>>>> this every time the page is requested, i first check to see if>>>> the fragment exists, then check to see if it=92s current, and>>>> then if both of those are false I render out the html, save it>>>> in a new fragment file, and display it to the user.>>>>=20>>>> SO.. here=92s my question: the fragments are saved as .inc or>>>> .frag. WebDNA does not cache these as they are neither>>>> templates nor databases. This causes a lot of disk activity as>>>> I use fragments extensively to speed up the the quasi-static>>>> parts of the website. How can I get webdna to cache these? I am>>>> hesitant to add the extensions to the template field in the>>>> settings. I do not want the fragment under any circumstance to>>>> be able to be directly accessed by a web visitor. Should I>>>> block the extension from being served by Apache? Would it be>>>> possible to get a third cache field type in the webdna>>>> settings? Thoughts? Suggestions?>>>>=20>>>> Thanks! Brian B.=20>>>> --------------------------------------------------------- This>>>> message is sent to you because you are subscribed to the>>>> mailing list . To unsubscribe, E-mail to:>>>> archives:>>>> http://mail.webdna.us/list/talk@webdna.us Bug Reporting:>>>> support@webdna.us>>>>=20>>> --------------------------------------------------------->>> This message is sent to you because you are subscribed to>>> the mailing list .>>> To unsubscribe, E-mail to: >>> archives: http://mail.webdna.us/list/talk@webdna.us>>> Bug Reporting: support@webdna.us>>>=20>>=20>>=20>> --------------------------------------------------------->> This message is sent to you because you are subscribed to>> the mailing list .>> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us>> Bug Reporting: support@webdna.us>=20> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> Bug Reporting: support@webdna.us
Donovan Brooke
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
problems with WebCat-Plugin (1997)
Number of Line Items (1998)
email program problem (1998)
All choices on IE different than Netscape (1997)
RE: [isfolder] and [filename] (1997)
Linux ODBC and the ODBC Bridge (2000)
WebCat2.0 [format thousands .0f] no go (1997)
Number of Line Items (1998)
Signal Raised Error (Part III) (1997)
flushdatabases (2000)
Unix Timestamp using WebDNA [code req] (2003)
NewCart+Search with one click ? (1997)
RAM problems, [appendfile] problems (1998)
Supressing Error Messages (1998)
Nested tags count question (1997)
WebCat2 - [format thousands] (1997)
Not carrying Zero (2000)
[WebDNA] Bug reporting (2009)
carriage returns in data (1997)
Multiple fields on 1 input (1997)