D
D
DYLAN2018-07-16 15:52:50
1C-Bitrix
DYLAN, 2018-07-16 15:52:50

How to properly set up caching in your own component?

Next question. I am writing an event schedule module, there is the following problem with caching.
There is a list of events, each event has its own limit on the number of participants. As soon as the limit is exceeded, the event is not displayed in the list, how to organize caching in this component. What dependency should be added? So far it turns out that the event should not be displayed, but the old cache is still alive.
Or, in this component, the organization of the cache is difficult and it is more expedient not to use it at all.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Panteleev, 2018-07-16
@s_panteleev

As an option, cache data in the schedule and after adding a new participant (registration?) reset the cache

A
Alexey Emelyanov, 2018-07-16
@babarun

Add the infoblock and day tags to the component cache.
In the handler for adding / deleting / changing an event in the calendar, reset the cache you need by tag

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question