Synchronising cache and file


 
Thread Tools Search this Thread
Top Forums Programming Synchronising cache and file
Prev   Next
# 2  
Old 05-11-2017
Since UNIX already caches files, I figure I do not need to maintain a separate cache in my
program. A judicious use of flock() and fsync() should do the job. Thank you. This thread is solved and closed
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Rsync - delete extra files in Destination without synchronising directories

I have a script that synchronises a directory to a DR server, but to improve the time, I actually use rsync to transfer files * in one batch and also * in another batch - both batches run from the same script and run in the background. My problem is that there isn't much space on the... (1 Reply)
Discussion started by: Catullus
1 Replies

2. Red Hat

Path of the DNS Cache file

We have a DNS server that is only using as a cache DNS of parent server. I wonder where it the cache file that it created from parent DNS? Please tell me where will be the cache file? (0 Replies)
Discussion started by: abhilashkrishn
0 Replies

3. Linux

File cache /Page cache Linux

Hi All, could any one point out any open source test-suites for "File cache" testing and as well as performance test suites for the same. Currently my system is up with Linux/ext4. Regards Manish (0 Replies)
Discussion started by: hmanish
0 Replies

4. Solaris

Zfs::zpool.cache file

Hi All, I am trying to read zpool.cache file to find out pool information like pool name, devices it uses and all properties. File seems to be in packed format.I am not sure how to unpack it. But from opensolaris code base we can see that they have used libz for uncompromising this file, but... (0 Replies)
Discussion started by: shailesh_111
0 Replies

5. Linux

getting info on Cache Size, Data Cache etc..

Hi all I saw in Microsoft web site www.SysInternals.com a tool called CoreInfo from able to print out on screen the size of the Data and Instruction caches of your processor, the Locigal to Physical Processor mapping, the number of the CPU sockets. etc.. Do you know if in Linux is available a... (2 Replies)
Discussion started by: manustone
2 Replies

6. Solaris

File cache portion of memory on Solaris

I'm looking to get the file cache portion of physical (real) memory on a Solaris workstation (Similar to the Cache: line in /proc/meminfo on some Linux systems): # swap -s; swap -l; vmstat 2 2; echo "::memstat" | mdb -k total: 309376k bytes allocated + 41428k reserved = 350804k used,... (5 Replies)
Discussion started by: Devyn
5 Replies

7. Solaris

Solaris File Cache

I started a previous thread : https://www.unix.com/sun-solaris/76721-coredumps-swap-part-solaris-mem-consumption.html But my fault as there is no xml feed for this forum i lost track and thread got closed. So in the mean time i went through some docs and here are my queries : 1. mdb -k... (2 Replies)
Discussion started by: rajwinder
2 Replies

8. AIX

Why is my file system cache so large

Hi I have a filesystem cache which is around 20G in size and I'm a bit perplexed as to what is in it. I'm running Sybase on the machine with the db on raw volumes and a tempdb on a ramdisk. My understanding is that raw volumes are not cached and I assumed that the ramdisk is not either. Am... (1 Reply)
Discussion started by: mgibbons
1 Replies

9. Linux

Nagios objects.cache file

Another nagios problem: I have this file: -rw-r----- 1 nagios nagios 21220 jun 9 17:29 objects.cache As you can see with rights at 640, nagios cannot read the file for configuration. I have to manually change the rights to 644 almost everyday. How can i get the rights to stay at 644? ... (1 Reply)
Discussion started by: penguin-friend
1 Replies

10. UNIX for Advanced & Expert Users

UBC cache vs. Metadata cache

hi, What is the difference between UBC cache and Metadata cache ? where can i find UBC cache Hits and Metadata cache Hits in hp-ux? Advanced thanx for the help. (2 Replies)
Discussion started by: sushaga
2 Replies
Login or Register to Ask a Question
LDAP_CACHE(3)						     Library Functions Manual						     LDAP_CACHE(3)

NAME
ldap_enable_cache, ldap_disable_cache, ldap_destroy_cache, ldap_flush_cache, ldap_uncache_entry, ldap_uncache_request, ldap_set_cache_options - LDAP client caching routines SYNOPSIS
#include <ldap.h> ldap_enable_cache( ld, timeout, maxmem ) LDAP *ld; long timeout; long maxmem; void ldap_disable_cache( ld ) LDAP *ld; void ldap_destroy_cache( ld ) LDAP *ld; void ldap_flush_cache( ld ) LDAP *ld; void ldap_uncache_entry( ld, dn ) LDAP *ld; char *dn; void ldap_uncache_request( ld, msgid ) LDAP *ld; int msgid; void ldap_set_cache_options( ld, opts ) LDAP *ld; unsigned long opts; DESCRIPTION
These routines are used to control the behavior of the experimental client caching of ldap_search(3) and ldap_compare(3) operations. By default, the cache is disabled and no caching is done. Enabling the cache can greatly improve performance and reduce network bandwidth when a client DUA makes repeated requests. ldap_enable_cache() should be called to turn on local caching or to change cache parameters (lifetime of cached requests and memory used). The ld parameter should be the result of a successful call to ldap_open(3). The timeout is specified in seconds, and is used to decide how long to keep cached requests. The maxmem value is in bytes, and is used to set an upper bound on how memory the cache will use. You can specify 0 for maxmem to restrict the cache size by the timeout only. The first call to ldap_enable_cache creates the cache; subsequent calls re-enable the cache and set the timeout and memory values. ldap_disable_cache() temporarily disables use of the cache (new requests are not cached and the cache is not checked when returning results). It does not delete the cache contents. ldap_destroy_cache() turns off caching and completely removes the cache from memory. ldap_flush_cache() deletes the cache contents, but does not effect it in any other way. ldap_uncache_entry() removes all requests that make reference to the distinguished name dn from the cache. It should be used, for example, after doing an ldap_modify(3) call involving dn. ldap_uncache_request() removes the request indicated by the LDAP request id msgid from the cache. ldap_set_cache_options() is used to change caching behavior. The current supported options are LDAP_CACHE_OPT_CACHENOERRS to suppress caching of any requests that result in an error, and LDAP_CACHE_OPT_CACHEALLERRS to enable caching of all requests. The default behavior is to not cache requests that result in errors, except that request that result in the error LDAP_SIZELIMIT_EXCEEDED are cached. ERRORS
ldap_enable_cache() returns 0 upon success, and -1 if it is unable to allocate space for the cache. All the other calls are declared as void and return nothing. SEE ALSO
ldap(3), ldap_search(3), ldap_compare(3) ACKNOWLEDGEMENTS
OpenLDAP is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). OpenLDAP is derived from University of Michigan LDAP 3.3 Release. OpenLDAP 2.0.27-Release 22 September 1998 LDAP_CACHE(3)