Hi: I'm having a problem with my reports be 'cached' by Turbogears. It is definitely possible that I'm placing the blame in the wrong place, but would appreciate any help if figuring out how I can get around this problem.
I followed the tutorial here: http://achievewith.us/public/articles/2007/02/21/produce-pdf-pages-with-turbogears-cheetah-and-reportlab to get TurboGears to serve up the pdfs I've created with ReportLab. It is working fine except for the fact that the data in my report doesn't change when I make an update to the database. If I restart the TG server, the new data then appears. Here is my controller snippet: @tg.expose(content_type="application/pdf") @identity.require(identity.has_permission('receivingReport')) def receivingReportPDF(self, *args, **kw): requisitionPeriodId = kw['requisitionPeriod'] plantId = kw['plant'] userId = identity.current.user.id letters_file = StringIO.StringIO() receivingReportRR(letters_file, requisitionPeriodId, plantId, userId) pdf = letters_file.getvalue() letters_file.close() return(pdf) I tested by doing the following: 1. Run the report (requisitionPeriodId=2, plant=4) -> everything works fine 2. Modify data that appears in the report 3. Run the report (requisitionPeriodId=2, plant=4) -> updated data does not appear 4. Run the report (requisitionPeriodId=3, plant=4) -> everything works fine 5. Run the report (requisitionPeriodId=2, plant=4) -> updated data does not appear 6. Restart TG 7. Run the report (requisitionPeriodId=2, plant=4) -> everything works fine According to the tutorial, this works great because the report is never cached. But, in my case it does seem to be cached. Any tips on what I can do to keep this from happening? Also, this happens across browser sessions. Once I run the report with a certain parm list, and then run it from a different machine with the same parm list, I always get the cached data, so I'm guessing this isn't a browser or session cache issue. -Jim --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. 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/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

