I have a database I'm working on. I've looked for maybe an example on the internet but I've not found much. I'm looking for a way to read and write to a database with multiple processes accessing it. I've used the DB_File and then flocked and unflocked the file. That works fine. The problem I'm having is that when another process tries to read the same record that i've written to in the other, I do not get the same data. If it was a new record, it works ok, but if I've modified a record it doesn't get it until I untie and retie the DBM. I am using sync to flush the chache after I write it also. I think the file is cacheing the data. Is there anyway to flush the READ cache? or maybe another type of database I can use that is not server based?

In reply to database problems by dl748

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.