in reply to Mysql query cache and DBI

When you use your code to insert the data and you do not see the data when you navigate to another part of your site, do you actually see the data when access your database from the command-line?

If yes, then this has nothing to do with the query cache at all. In fact, MySQL query cache is only used for select queries. Either you have inserted your data or it was not inserted at all.

If no, then there is a problem with the way you are inserting the data into your database.

Replies are listed 'Best First'.
Re^2: Mysql query cache and DBI
by josh803316 (Beadle) on Nov 07, 2009 at 00:42 UTC
    The data is inserted, I can see the values on the mysql command line (or via query browser). The problem is the subsequent list_all that is returning the entire set minus the newly created data. This is what led me to think it was a cache-ing issue.

    Also, the list_all is doing a select query so again this could very well be a cache-ing issue:
    Below code comes from list_all
    my $objects = $dbh->selectall_arrayref("SELECT $columns FROM $table OR +DER BY $order", {Slice=>{}}, @column_values);
      I realized that I should add more information to this post. The scope is different for each request. In the list_all request I'm querying a gearman (gearman.org) database worker daemon which is a long running process that keeps the $dhb in memory. In the create request it is via a different method and a new $dbh which means it must have something do with the cache of the long running process. How can I refresh/reset the cache?