unique_entries
This is the cache table where data that regularly needs to be fetched is stored. This helps to avoid calculation of same data over and over and reduce load on the system.
Why this table exists?
This table is used to store data that is regularly called by the users. For example, price data for a mandi-crop-date combination. Instead of quering this each time a user ask this data, we can do it once and store it in this table from where we can fetch it easily. This reduces load on the system and help us to send respnse much faster. To know more on how this table is used, you can read here.
Model
_id
varchar
_type
int4
data
varchar
created_at
timestamp
updated_at
timestamp
payload
json
user_id
int4
Description
_id
This is the primary key and unique identifier of the entry. This serves as a cache key to fetch the cache payload value.
_type
This is being used to mark the type of the unique entry.
We might need to rethink the purpose of this field and possibly rename or replace it with a more meaningful data.
data
This was an old field. Not being used anymore.
created_at
Timestamp when the entry was created.
updated_at
Timestamp when the entry was last updated.
payload
The value stored against the key. This is a JSON field and can hold different information based on the entry. For example, an OTP value is stored like this:
user_id
The ID of the user. This field isn't being used from any active module.
This field can be removed.
Example
mandi_prices_hi__326
1
mobile_number_otp__919090430991
1
mandi_crops_web_frequent__110
2
mandi_calender__118
3
location_crop_prices__1124_3
4
mandi_review_stats__904
5
mandi_all_details_web__470
6
mandi_crop_price_trends_hi__134_30
`7
crop_all_details_web__62
8
all_referral__34141
9
referral__FG502
10
referral_ranks__10
11
cs_mandi_price_broadcast_evenin
12
referral__MCMIX
13
missing_entries
14
random_user_auth__ff91b6c7-0c63-4fc8-bd6b-c56907046db9
15
cs_mandi_crop__20_3_28-07-2023
16
cs_mandi__20_18-08-2023
17
cs_mandi_data_no_price__29_28-10-2023
18
-
19
debit_from_membership_wallet_for_old_membership_2024-02-23
20
trader_crop_114_12-02-2024
21
trader_parent_crop_272_17-02-2024
22
trader_crop_mandi_116_08-02-2024
23
trader_mandi_20_crop_232_12-02-2024
24
Last updated