in reply to Re: Saving MySQL Queries in an XML format
in thread Saving MySQL Queries in an XML format

Beware. Cache::Cache is meant as a cache, not as a storage mechanism. It could reply "not found" to every single request to recover a previous value, and still be fully within spec (although a poor implementation).

The point of a cache is to possibly avoid re-computing a computable item, not to hold a non-computable item.

To store a non-computable item, use a proper database.

-- Randal L. Schwartz, Perl hacker

  • Comment on •Re: Re: Saving MySQL Queries in an XML format

Replies are listed 'Best First'.
Re: •Re: Re: Saving MySQL Queries in an XML format
by oakbox (Chaplain) on Jul 05, 2002 at 15:45 UTC
    Well, it's not just a simple query against the database. On some a complex queries (the ones I'm storing in XML), there are 10 to 15 separate database hits and then some calculations on the values I'm getting back out of it. Then I'm sticking all of the values into a reference (for moving the data from module back to caller) then it is a big help to store that reference using XML::Simple. The whole interface of XML::Simple is built around storing and reading references, so I didn't need to do any 'extra' work to start using it.

    The ability to export my ready-made XML objects to other systems is just icing on the cake. In future improvements, I can see the possibility of a customer not wanting to deal with data over my web portal, but being able to import my data directly into their back-end.

    I guess what I'm trying to figure out is, if this was a crazy way to implement this solution, and it looks like it's not TOO crazy :)
    -oakbox