cancel
Showing results for 
Search instead for 
Did you mean: 

Can I use cache in the WAS instead of accessing DDBB?

Former Member
0 Kudos

Hello!

I'm programming a bsp application, and I have a menu with several options to select the one user's want to see. This html/javascript menu show options builded accessing DDBB. This produces lots of data base access. I want to know if WAS support some type of cache, to reduce the data base access.

Thanks!!

Antonio.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member181879
Active Contributor
0 Kudos

Hallo Antonio,

I am a great believer of letting someone jump in on the deep side. They learn to swim very fast! But in this case, your question makes me think it is to deep at the moment. So I am going to write some ideas to you. Just decide the route to go, and we will get you swimming again. (Thanks for some answers you have appended in the past.)

First some questions to you (we need this for later):

- what does DDBB stand for? (DB=database)

- is this application stateful or stateless?

- are you using a BSP page or controller/view?

- can you make an example in 25 lines? (just DB work, plus use tableView for display)

(1) Databases can be cached, partially or completely in application server. This means that the selects are actually answered locally. On this, you will have to do some doc reading. Also, look in transaction SE11, technical info for the dabase you are using.

(2) If you are running stateful, just use the onCreate of a BSP page, or somewhere in a controller/application class to read the DB once. As you are stateful, the data will not be destroyed.

(3) If stateless, one can still store lots of information. One place is to export to shared memory. The other is to write into server side cookie (which is again stored on DB!, but just as one blob). In new Netweaver 04 you can also use a very nice feature called shared objects!

Now first we must wait for the answers from you. If stateful, I will suggest some code restructuring. If stateless, I think the fastest is shared memory. I can write the final example quickly for you.

++bcm

Former Member
0 Kudos

Hello Brian!

First of all, thank you very much for your ideas!

Sorry if I have confused you, I'm not explain in English well, when say DDBB mean database. The application is statefull, we're using BSP pages (don't know much about model view controller in BSP).

The problem is that the site is going to have lots of visits, and the administrators wants to reduce the database access. The html/javascript menu is stored on tables in database. We are going to have around one hundred of menus.

One visit may be one access to this table, but sometimes a new menu is going to be stored on the table. Is posible that a menu could be modified too. I don't know if a database partially stored on cache detects changes on the local database and updates the one stored on cache.

It's too dificult to store partially the database?

What could be the best way?

Thanks in advance!

former_member181879
Active Contributor
0 Kudos

Antonio,

When you are running stateful, the already you complete context is kept in memory. So this is all OK.

Yes, you can configure database tables to be cached. And if they change, the cache is invalidated and loaded new.

All of this is ABAP over many year already. In this case, I would seriously recommend that you do some reading on database configuration, caching (technical settings). You can also look at documents to performance, as they usually also discuss these aspects.

Why not look into transaction SE11, there is a button called "technical settings". Click on one of the radio buttons for cache settings and then press F1.

Former Member
0 Kudos

Thank you!

I'll tell you what I'll do.

Cordial regards,

Antonio.