2021-02-04 05:20:16

by Kenny Bian

[permalink] [raw]
Subject: How to disable cache?

Hello,

In "/etc/bluetooth/main.conf", there seems a way to disable the cache:
[GATT]
Cache = no

What does exactly the "disable cache" mean? It means the
"/var/lib/bluetooth/[MAC_ADDRESS]/cache" folder won't be created?

We tried to disable the cache by changing the
"/etc/bluetooth/main.conf". It seems the
"/var/lib/bluetooth/[MAC_ADDRESS]/cache" folder is still created even
if it was deleted.
However, we noticed that the "[Attributes]" section in
"/var/lib/bluetooth/[MAC_ADDRESS]/cache/[iPHONE_MAC]" file is gone.
Does it mean the "disable cache" is working? Does it mean the handles
used between the bluetooth and the mobile app won't be cached?

Thanks!


2021-02-04 17:02:25

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: How to disable cache?

Hi Kenny,

On Wed, Feb 3, 2021 at 9:20 PM Kenny Bian <[email protected]> wrote:
>
> Hello,
>
> In "/etc/bluetooth/main.conf", there seems a way to disable the cache:
> [GATT]
> Cache = no
>
> What does exactly the "disable cache" mean? It means the
> "/var/lib/bluetooth/[MAC_ADDRESS]/cache" folder won't be created?

That means it won't cache any GATT attribute found when discovering,
the cache folder has other information as well.

> We tried to disable the cache by changing the
> "/etc/bluetooth/main.conf". It seems the
> "/var/lib/bluetooth/[MAC_ADDRESS]/cache" folder is still created even
> if it was deleted.
> However, we noticed that the "[Attributes]" section in
> "/var/lib/bluetooth/[MAC_ADDRESS]/cache/[iPHONE_MAC]" file is gone.
> Does it mean the "disable cache" is working? Does it mean the handles
> used between the bluetooth and the mobile app won't be cached?

Yes, that is the result of not caching anything.

--
Luiz Augusto von Dentz

2021-02-05 04:04:54

by Kenny Bian

[permalink] [raw]
Subject: Re: How to disable cache?

Thanks Luiz.

We may disable the cache.

On Thu, Feb 4, 2021 at 8:52 AM Luiz Augusto von Dentz
<[email protected]> wrote:
>
> Hi Kenny,
>
> On Wed, Feb 3, 2021 at 9:20 PM Kenny Bian <[email protected]> wrote:
> >
> > Hello,
> >
> > In "/etc/bluetooth/main.conf", there seems a way to disable the cache:
> > [GATT]
> > Cache = no
> >
> > What does exactly the "disable cache" mean? It means the
> > "/var/lib/bluetooth/[MAC_ADDRESS]/cache" folder won't be created?
>
> That means it won't cache any GATT attribute found when discovering,
> the cache folder has other information as well.
>
> > We tried to disable the cache by changing the
> > "/etc/bluetooth/main.conf". It seems the
> > "/var/lib/bluetooth/[MAC_ADDRESS]/cache" folder is still created even
> > if it was deleted.
> > However, we noticed that the "[Attributes]" section in
> > "/var/lib/bluetooth/[MAC_ADDRESS]/cache/[iPHONE_MAC]" file is gone.
> > Does it mean the "disable cache" is working? Does it mean the handles
> > used between the bluetooth and the mobile app won't be cached?
>
> Yes, that is the result of not caching anything.
>
> --
> Luiz Augusto von Dentz