Apache-DBI-Cache

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    Both point to the same database but for Apache::DBI they are different.
    Apache::DBI::Cache recognizes these two by means of a *mysql* plugin.

    The plugin even recognizes connections to different databases on the
    same mysql server as the same connection and issues a "USE database"
    command before returning the actual handle to the user. Hence, with
    Apache::DBI::Cache many the overall number of connections to a DB server
    can be dramatically reduced.

  HOW DOES IT WORK?
    To decide whether to use Apache::DBI::Cache or not it is essential to
    know how it works. As with Apache::DBI Apache::DBI::Cache uses a hook
    provided by the DBI module to intercept "DBI->connect()" calls. Also do
    Apache::DBI::Cache maintain a cache of active handles.

    When a new connection is requested and the cache is empty a new
    connection is established and returned to the user. At this point it is
    not cached at all. Here Apache::DBI::Cache differs from Apache::DBI.

    Later either "disconnect" is called on the handle or it simply goes out
    of scope and the garbage collector calls a "DESTROY" method if provided.

lib/Apache/DBI/Cache.pod  view on Meta::CPAN

Apache::DBI::Cache recognizes these two by means of a I<mysql> plugin.

The plugin even recognizes connections to different databases on the
same mysql server as the same connection and issues a C<USE database>
command before returning the actual handle to the user. Hence, with
Apache::DBI::Cache many the overall number of connections to a DB server
can be dramatically reduced.

=head2 HOW DOES IT WORK?

To decide whether to use Apache::DBI::Cache or not it is essential to
know how it works. As with Apache::DBI Apache::DBI::Cache uses a hook
provided by the DBI module to intercept C<< DBI->connect() >> calls.
Also do Apache::DBI::Cache maintain a cache of active handles.

When a new connection is requested and the cache is empty a new connection
is established and returned to the user. At this point it is B<not> cached at
all. Here Apache::DBI::Cache differs from Apache::DBI.

Later either C<disconnect> is called on the handle or it simply
goes out of scope and the garbage collector calls a C<DESTROY> method



( run in 0.431 second using v1.01-cache-2.11-cpan-de7293f3b23 )