Oracle 5.0 Reference Manual page 1380

Table of Contents

Advertisement

You can introduce
design. In many languages and environments the changes to the application will be just a few lines,
first to attempt to read from the cache when loading data, fall back to the old method if the information
is not cached, and to update the cache with information once the data has been read.
The general sequence for using
follows:
1. Request the item from the cache.
2. If the item exists, use the item data.
3. If the item does not exist, load the data from MySQL, and store the value into the cache. This
means the value is available to the next client that requests it from the cache.
For a flow diagram of this sequence, see
Figure 15.8. Typical
Adapting Database Best Practices to
The most direct way to cache MySQL data is to use a 2-column table, where the first column is a
primary
key. Because of the uniqueness requirements for
schema makes appropriate use of primary keys and
If you combine multiple column values into a single
make it easy to parse the value back into its components, for example by using a separator character
between numeric values.
The queries that map most easily to
an
or
operator. For complicated
=
IN
or LIKE,
memcached
or associated values, so typically you perform those operations as SQL queries on the underlying
database.
Developing a
information before caching it. To restrict the users capable of connecting to the
server, either disable network access, or use IPTables or similar techniques to
restrict access to the
memcached
to an existing application, even if caching was not part of the original
memcached
memcached
Application Flowchart
memcached
memcached
memcached
WHERE
does not provide a simple or efficient way to scan through or filter the keys
Application
memcached
ports to a select set of hosts.
in any language as a caching solution for MySQL is as
Figure 15.8, "Typical
memcached
Applications
memcached
unique
constraints.
memcached
lookups are those with a single
clauses, or those using operators such as <, >, BETWEEN,
1360
Application
keys, make sure your database
item value, choose data types to
WHERE
Flowchart".
clause, using

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents