Tcl Library Source Code

Check-in [e01af4e06f]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Applied submitted patches to fix ticket [fdf6afed94].
Timelines: family | ancestors | descendants | both | tkt-fdf6afed94
Files: files | file ages | folders
SHA3-256:e01af4e06ffd874b510f9c20f045662229e2c26b206e7e8de7d5535e412e14e6
User & Date: andrewm 2018-12-15 00:18:59
Original Comment: Applied submitted patches to fix ticket [fdf6afe94].
Context
2019-02-21
23:32
Tkt [fdf6afed94] done. Merged tkt-fdf6afed94, full tests passing. check-in: 5e257ddf79 user: aku tags: trunk
2018-12-15
00:18
Applied submitted patches to fix ticket [fdf6afed94]. Closed-Leaf check-in: e01af4e06f user: andrewm tags: tkt-fdf6afed94
00:08
Create new branch named "tkt-fdf6afed94" check-in: 0d40e3ac79 user: andrewm tags: tkt-fdf6afed94
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to modules/cache/ChangeLog.









1
2
3
4
5
6
7








2013-02-01  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.15 ========================
	* 

2011-12-13  Andreas Kupries  <andreas_kupries@users.sourceforge.net>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2018-08-28  Aldo Buratti

    *
    * BugFix in method 'clear'
        * Added a test in async.test
    * Release 0.3.1
    *

2013-02-01  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.15 ========================
	* 

2011-12-13  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

Changes to modules/cache/async.man.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

[manpage_begin cache::async n 0.3]
[keywords asynchronous]
[keywords cache]
[keywords callback]
[keywords synchronous]
[copyright {2008 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {In-memory caches}]
[titledesc {Asynchronous in-memory cache}]
[require Tcl 8.4]
[require cache::async [opt 0.3]]
[description]

This package provides objects which cache data in memory, and operate
asynchronously with regard to request and responses. The objects are
agnostic with regard to cache keys and values, and unknown methods are
delegated to the provider of cached data. These two properties make it
easy to use caches as a facade for any data provider.
>
|








|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[vset Version 0.3.1]
[manpage_begin cache::async n [vset Version]]
[keywords asynchronous]
[keywords cache]
[keywords callback]
[keywords synchronous]
[copyright {2008 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {In-memory caches}]
[titledesc {Asynchronous in-memory cache}]
[require Tcl 8.4]
[require cache::async [opt [vset Version]]]
[description]

This package provides objects which cache data in memory, and operate
asynchronously with regard to request and responses. The objects are
agnostic with regard to cache keys and values, and unknown methods are
delegated to the provider of cached data. These two properties make it
easy to use caches as a facade for any data provider.

Changes to modules/cache/async.tcl.

78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
...
178
179
180
181
182
183
184
185
	# not present the state will not change, and queries in flight
	# simply refill the cache as they would do anyway without the
	# 'clear'.

	if {![llength $args]} {
	    array unset myhit  *
	    array unset mymiss *
	} elseif {[llength $arg] == 1} {
	    set key [lindex $args 0]
	    unset -nocomplain  myhit($key)
	    unset -nocomplain mymiss($key)
	} else {
	    WrongArgs ?key?
	}
	return
................................................................................

    # ### ### ### ######### ######### #########
}

# ### ### ### ######### ######### #########
## Ready

package provide cache::async 0.3







|







 







|
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
...
178
179
180
181
182
183
184
185
	# not present the state will not change, and queries in flight
	# simply refill the cache as they would do anyway without the
	# 'clear'.

	if {![llength $args]} {
	    array unset myhit  *
	    array unset mymiss *
	} elseif {[llength $args] == 1} {
	    set key [lindex $args 0]
	    unset -nocomplain  myhit($key)
	    unset -nocomplain mymiss($key)
	} else {
	    WrongArgs ?key?
	}
	return
................................................................................

    # ### ### ### ######### ######### #########
}

# ### ### ### ######### ######### #########
## Ready

package provide cache::async 0.3.1

Changes to modules/cache/async.test.

221
222
223
224
225
226
227
228





























229
230
} -cleanup {
    ca destroy
} -result {BEGIN
WAIT
DATA_HOLE get KEY ::ca
DONE {unset KEY}
RESUME}






























# -------------------------------------------------------------------------
testsuiteCleanup








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
} -cleanup {
    ca destroy
} -result {BEGIN
WAIT
DATA_HOLE get KEY ::ca
DONE {unset KEY}
RESUME}

# -- $obj clear ---------------------------------------------------------------

test cache-async-6.0 {clear a not existing value} -setup {
    cache::async ca DATA_NONE
    res!
} -body {
    res+ BEGIN
    ca clear KEY
    res+ END
    res?lines
} -cleanup {
    ca destroy
} -result {BEGIN
END}

test cache-async-6.1 {clear an existing value} -setup {
    cache::async ca DATA_NONE
    ca set KEY VALUE
    res!
} -body {
    res+ BEGIN
    ca clear KEY
    res+ END
    res?lines
} -cleanup {
    ca destroy
} -result {BEGIN
END}

# -------------------------------------------------------------------------
testsuiteCleanup

Changes to modules/cache/pkgIndex.tcl.

1
2
3
if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded cache::async 0.3 [list source [file join $dir async.tcl]]


|

1
2
3
if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded cache::async 0.3.1 [list source [file join $dir async.tcl]]