OrientDB Caching - OrientDB

What is OrientDB Caching?

Caching is a concept in order to create a copy of the database table structure providing a secure environment for the person applications. OrientDB has several caching mechanisms at special levels.

The following example gives an concept about what caching is.

OrientDB - Caching


in the above example DB1, DB2, DB3 are the three special database times used in an application.

level-1 cache is a local cache which stores all of the entities recognised by using a selected session. if you have three transactions in this session, it will maintain all entities utilized by all three transactions. This cache gets cleared when you close the session or when you carry out the "clear" approach. It reduces the weight of the I/O operations among the application and the database and in turn increases the performance.

level-2 cache is a real cache that works by using third party issuer. you may have complete manage over the contents of the cache, i.e. you may be capable of specify which entries need to be removed, which of them need to be saved longer and so on. it is a complete shared cache amongst multiple threads.

storage model is nothing but storage tool that is disk, memory, or remote server.

How Cache Works in OrientDB?

OrientDB caching presents special methodologies in special environments. Caching is specifically used for faster database transactions, reducing the processing time of a transaction and increasing the performance. the following go with the flow diagrams show how caching works in local mode and client-server mode.

Local Mode (Embedded Database)

The following flow diagram tells you ways the record is in-between storage and used application inside the local mode i.e., when your database server is on your localhost.

OrientDB - Caching

When the purchaser application asks for a file OrientDB tests for the following −

  • If a transaction has started, then it searches inside the transaction for changed data and returns it if observed.
  • If the local cache is enabled and carries the asked record, then returns it.
  • If at this point the file is not in cache, then asks for it to the storage (disk, memory).

Client Server Mode (remote Database)

The following flow diagram tells you how the file is in-among storage and used application within the client-server mode i.e., when your database server is in remote place.

OrientDB - Caching

when the client application asks for a file, OrientDB tests for the following −

  • If a transaction has started, then it searches in the transaction for changed data and returns it if observed.
  • If the local cache is enabled and carries the asked file, then returns it.
  • At this point, if the report is not in cache, then asks for it to the Server through a TCP/IP name.
  • Within the server, if the local cache is enabled and carries the asked file, then returns it.
  • At this point, still the report is not cached in the server, then asks for it to the storage (disk, memory).

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

OrientDB Topics