Skip to main content

Deleting local cache

4 replies [Last post]
dc5
Offline
Joined: 2008-08-31
Points: 0

Hey folks,

Can anyone tell me if there is or they have seen any example code that will delete the local cache or remove all advertisements from the cache each time a JXTA application is started?

Cheers,

DC5

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mick_000
Offline
Joined: 2009-01-22
Points: 0

No probs.

mick_000
Offline
Joined: 2009-01-22
Points: 0

There r two methods called flushAdvertisement(adv) and flushAdvertisements(id,type) in DiscoveryService class which u can make use of to delete advertisements.

If u want to delete all adv of particular type in local cache, go for the 2nd one where u can give a null value for id and type as DiscoveryService.Type. If u want to delete a specific adv then give its id in the 1st parameter.

Hope it helps.

dc5
Offline
Joined: 2008-08-31
Points: 0

Cheers mick!

Much appreciated mate.

DC5

fdimeglio
Offline
Joined: 2004-04-14
Points: 0

Hello,

As far as I know, deleting the cache is no more useful starting 2.5 release. It was somewhat compulsory with 2.4.x.

If you really need to, a simple delete on the corresponding cache dir BEFORE logging to the JXTA network is a way to do it.

Fabrice